mirror of https://gitee.com/bigwinds/arangodb
Add unittests_config target to JS testing framework.
This commit is contained in:
parent
bc99b765d0
commit
c567ea90c7
|
@ -395,6 +395,11 @@ function waitForCompletion (pid) {
|
|||
return stat.exit;
|
||||
}
|
||||
|
||||
function executeAndWait (cmd, args) {
|
||||
var pid = executeExternal(cmd, args);
|
||||
return statusExternal(pid, true).exit;
|
||||
}
|
||||
|
||||
testFuncs.shell_client = function(options) {
|
||||
var topDir = fs.normalize(fs.join(ArangoServerState.executablePath(),
|
||||
"..",".."));
|
||||
|
@ -413,8 +418,7 @@ testFuncs.shell_client = function(options) {
|
|||
args.push(fs.join(topDir,te));
|
||||
var arangosh = fs.normalize(fs.join(ArangoServerState.executablePath(),
|
||||
"..","arangosh"));
|
||||
var pid = executeExternal(arangosh, args);
|
||||
results[te] = waitForCompletion(pid);
|
||||
results[te] = executeAndWait(arangosh, args);
|
||||
args.pop();
|
||||
if (r !== 0 && !options.force) {
|
||||
break;
|
||||
|
@ -430,17 +434,26 @@ testFuncs.config = function (options) {
|
|||
var topDir = fs.normalize(fs.join(ArangoServerState.executablePath(),
|
||||
"..",".."));
|
||||
var results = {};
|
||||
var pid, r;
|
||||
pid = executeExternal(fs.join(topDir,"bin","arangod"),
|
||||
["--configuration",
|
||||
fs.join(topDir,"etc","arangodb","arangod.conf"),
|
||||
var ts = ["arangod", "arangob", "arangodump", "arangoimp", "arangorestore",
|
||||
"arangosh"];
|
||||
var t;
|
||||
for (i = 0; i < ts.length; i++) {
|
||||
t = ts[i];
|
||||
results[t] = executeAndWait(fs.join(topDir,"bin",t),
|
||||
["--configuration", fs.join(topDir,"etc","arangodb",t+".conf"),
|
||||
"--help"]);
|
||||
r = waitForCompletion(pid);
|
||||
results["arangod"] = r;
|
||||
print("Config test arangod...",r);
|
||||
print("Config test "+t+"...",results[t]);
|
||||
}
|
||||
for (i = 0; i < ts.length; i++) {
|
||||
t = ts[i];
|
||||
results[t+"_rel"] = executeAndWait(fs.join(topDir,"bin",t),
|
||||
["--configuration", fs.join(topDir,"etc","relative",
|
||||
t+".conf"), "--help"]);
|
||||
print("Config test "+t+" (relative)...",results[t+"_rel"]);
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
};
|
||||
|
||||
testFuncs.dummy = function (options) {
|
||||
var instanceInfo = startInstance("tcp",options);
|
||||
|
|
Loading…
Reference in New Issue