1
0
Fork 0

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:
Willi Goesgens 2015-03-02 19:09:28 +01:00
parent b98665bbdd
commit 24451f3709
2 changed files with 19 additions and 3 deletions

View File

@ -14,6 +14,8 @@ var runTest = require('jsunity').runTest,
runJSUnityTests = function (tests) {
'use strict';
var result = true;
var allResults = [];
var res;
_.each(tests, function (file) {
// find out whether we're on server or client...
@ -30,7 +32,9 @@ runJSUnityTests = function (tests) {
}
try {
result = result && runTest(file).status;
res = runTest(file);
allResults.push(res);
result = result && res.status;
} catch (err) {
print(runenvironment + ": cannot run test file '" + file + "': " + err);
print(err.stack);
@ -40,7 +44,7 @@ runJSUnityTests = function (tests) {
internal.wait(0); // force GC
});
require("fs").write("testresult.json", JSON.stringify(allResults));
return result;
};

View File

@ -60,6 +60,7 @@ var optionsDocumentation = [
' - `skipAql`: if set to true the AQL tests are skipped',
' - `skipRanges`: if set to true the ranges tests are 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',
' of a small local cluster',
@ -777,7 +778,15 @@ function runInArangosh (options, instanceInfo, file, addArgs) {
args = args.concat(addArgs);
}
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) {
@ -1228,6 +1237,9 @@ testFuncs.http_server = function (options) {
};
testFuncs.ssl_server = function (options) {
if (options.hasOwnProperty('skipSsl')) {
return {};
}
return rubyTests(options, true);
};