mirror of https://gitee.com/bigwinds/arangodb
Testsuite:
- add possibility to skip ruby https tests - try to send test results from arangosh to server via a temporary file; fallback to rc.
This commit is contained in:
parent
b98665bbdd
commit
24451f3709
|
@ -14,6 +14,8 @@ var runTest = require('jsunity').runTest,
|
||||||
runJSUnityTests = function (tests) {
|
runJSUnityTests = function (tests) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var result = true;
|
var result = true;
|
||||||
|
var allResults = [];
|
||||||
|
var res;
|
||||||
|
|
||||||
_.each(tests, function (file) {
|
_.each(tests, function (file) {
|
||||||
// find out whether we're on server or client...
|
// find out whether we're on server or client...
|
||||||
|
@ -30,7 +32,9 @@ runJSUnityTests = function (tests) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = result && runTest(file).status;
|
res = runTest(file);
|
||||||
|
allResults.push(res);
|
||||||
|
result = result && res.status;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
print(runenvironment + ": cannot run test file '" + file + "': " + err);
|
print(runenvironment + ": cannot run test file '" + file + "': " + err);
|
||||||
print(err.stack);
|
print(err.stack);
|
||||||
|
@ -40,7 +44,7 @@ runJSUnityTests = function (tests) {
|
||||||
|
|
||||||
internal.wait(0); // force GC
|
internal.wait(0); // force GC
|
||||||
});
|
});
|
||||||
|
require("fs").write("testresult.json", JSON.stringify(allResults));
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ var optionsDocumentation = [
|
||||||
' - `skipAql`: if set to true the AQL tests are skipped',
|
' - `skipAql`: if set to true the AQL tests are skipped',
|
||||||
' - `skipRanges`: if set to true the ranges tests are skipped',
|
' - `skipRanges`: if set to true the ranges tests are skipped',
|
||||||
' - `skipTimeCritical`: if set to true, time critical tests will be skipped.',
|
' - `skipTimeCritical`: if set to true, time critical tests will be skipped.',
|
||||||
|
' - `skipSsl`: ommit the ssl_server rspec tests.',
|
||||||
'',
|
'',
|
||||||
' - `cluster`: if set to true the tests are run with the coordinator',
|
' - `cluster`: if set to true the tests are run with the coordinator',
|
||||||
' of a small local cluster',
|
' of a small local cluster',
|
||||||
|
@ -777,7 +778,15 @@ function runInArangosh (options, instanceInfo, file, addArgs) {
|
||||||
args = args.concat(addArgs);
|
args = args.concat(addArgs);
|
||||||
}
|
}
|
||||||
var arangosh = fs.join("bin","arangosh");
|
var arangosh = fs.join("bin","arangosh");
|
||||||
return executeAndWait(arangosh, args);
|
var result;
|
||||||
|
var rc = executeAndWait(arangosh, args);
|
||||||
|
try {
|
||||||
|
result = JSON.parse(fs.read("testresult.json"));
|
||||||
|
}
|
||||||
|
catch(x) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
return result[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function runArangoshCmd (options, instanceInfo, cmds) {
|
function runArangoshCmd (options, instanceInfo, cmds) {
|
||||||
|
@ -1228,6 +1237,9 @@ testFuncs.http_server = function (options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
testFuncs.ssl_server = function (options) {
|
testFuncs.ssl_server = function (options) {
|
||||||
|
if (options.hasOwnProperty('skipSsl')) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
return rubyTests(options, true);
|
return rubyTests(options, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue