1
0
Fork 0

Fix JS testing framework with new path setup.

This commit is contained in:
Max Neunhoeffer 2014-02-28 15:38:25 +01:00
parent 423bec9a2b
commit 7544adcc8d
1 changed files with 10 additions and 18 deletions

View File

@ -202,8 +202,7 @@ function startInstance (protocol, options, addArgs) {
if (addArgs !== undefined) { if (addArgs !== undefined) {
args = args.concat(addArgs); args = args.concat(addArgs);
} }
instanceInfo.pid = executeExternal(ArangoServerState.executablePath(), instanceInfo.pid = executeExternal(fs.join("bin","arangod"), args);
args);
} }
// Wait until the server/coordinator is up: // Wait until the server/coordinator is up:
@ -345,8 +344,7 @@ function runInArangosh (options, instanceInfo, file, addArgs) {
if (addArgs !== undefined) { if (addArgs !== undefined) {
args = args.concat(addArgs); args = args.concat(addArgs);
} }
var arangosh = fs.normalize(fs.join(ArangoServerState.executablePath(), var arangosh = fs.join("bin","arangosh");
"..","arangosh"));
return executeAndWait(arangosh, args); return executeAndWait(arangosh, args);
} }
@ -355,8 +353,7 @@ function runArangoshCmd (options, instanceInfo, cmds) {
args.push("--server.endpoint"); args.push("--server.endpoint");
args.push(instanceInfo.endpoint); args.push(instanceInfo.endpoint);
args = args.concat(cmds); args = args.concat(cmds);
var arangosh = fs.normalize(fs.join(ArangoServerState.executablePath(), var arangosh = fs.join("bin","arangosh");
"..","arangosh"));
return executeAndWait(arangosh, args); return executeAndWait(arangosh, args);
} }
@ -493,8 +490,7 @@ testFuncs.single = function (options) {
args.push("--javascript.unit-tests"); args.push("--javascript.unit-tests");
args.push(fs.join(topDir,te)); args.push(fs.join(topDir,te));
print("\nTrying",te,"on client..."); print("\nTrying",te,"on client...");
var arangosh = fs.normalize(fs.join(ArangoServerState.executablePath(), var arangosh = fs.join("bin","arangosh");
"..","arangosh"));
result.client = executeAndWait(arangosh, args); result.client = executeAndWait(arangosh, args);
} }
} }
@ -586,8 +582,7 @@ function runArangoImp (options, instanceInfo, what) {
args.push("--create-collection"); args.push("--create-collection");
args.push(what.create); args.push(what.create);
} }
var arangoimp = fs.normalize(fs.join(ArangoServerState.executablePath(), var arangoimp = fs.join("bin","arangoimp");
"..","arangoimp"));
return executeAndWait(arangoimp, args); return executeAndWait(arangoimp, args);
} }
@ -601,14 +596,12 @@ function runArangoDumpRestore (options, instanceInfo, which, database) {
if (which === "dump") { if (which === "dump") {
args.push("--output-directory"); args.push("--output-directory");
args.push(fs.join(instanceInfo.tmpDataDir,"dump")); args.push(fs.join(instanceInfo.tmpDataDir,"dump"));
exe = fs.normalize(fs.join(ArangoServerState.executablePath(), exe = fs.join("bin","arangodump");
"..","arangodump"));
} }
else { else {
args.push("--input-directory"); args.push("--input-directory");
args.push(fs.join(instanceInfo.tmpDataDir,"dump")); args.push(fs.join(instanceInfo.tmpDataDir,"dump"));
exe = fs.normalize(fs.join(ArangoServerState.executablePath(), exe = fs.join("bin","arangorestore");
"..","arangorestore"));
} }
return executeAndWait(exe, args); return executeAndWait(exe, args);
} }
@ -620,8 +613,7 @@ function runArangoBenchmark (options, instanceInfo, cmds) {
"--server.password", options.password, "--server.password", options.password,
"--server.endpoint", instanceInfo.endpoint]; "--server.endpoint", instanceInfo.endpoint];
args = args.concat(cmds); args = args.concat(cmds);
var exe = fs.normalize(fs.join(ArangoServerState.executablePath(), var exe = fs.join("bin","arangob");
"..","arangob"));
return executeAndWait(exe, args); return executeAndWait(exe, args);
} }
@ -704,12 +696,12 @@ testFuncs.upgrade = function (options) {
args.push(fs.join(tmpDataDir,"data")); args.push(fs.join(tmpDataDir,"data"));
fs.makeDirectoryRecursive(fs.join(tmpDataDir,"data")); fs.makeDirectoryRecursive(fs.join(tmpDataDir,"data"));
args.push("--upgrade"); args.push("--upgrade");
result.first = executeAndWait(ArangoServerState.executablePath(), args); result.first = executeAndWait(fs.join("bin","arangod"), args);
if (result.first !== 0 && !options.force) { if (result.first !== 0 && !options.force) {
return result; return result;
} }
result.second = executeAndWait(ArangoServerState.executablePath(), args); result.second = executeAndWait(fs.join("bin","arangod"), args);
fs.removeDirectoryRecursive(tmpDataDir); fs.removeDirectoryRecursive(tmpDataDir);