1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into cmakification

This commit is contained in:
Kaveh Vahedipour 2016-02-11 13:00:56 +01:00
commit c69d664989
2 changed files with 36 additions and 13 deletions

View File

@ -86,6 +86,12 @@ function resultsToXml(results, baseName, cluster) {
} }
let xml = buildXml(); let xml = buildXml();
let total = 0;
if (current.hasOwnProperty('total')) {
total = current.total;
}
let failuresFound = 0; let failuresFound = 0;
if (current.hasOwnProperty('failed')) { if (current.hasOwnProperty('failed')) {
@ -95,8 +101,8 @@ function resultsToXml(results, baseName, cluster) {
xml.elem("testsuite", { xml.elem("testsuite", {
errors: 0, errors: 0,
failures: failuresFound, failures: failuresFound,
tests: total,
name: clprefix + runName, name: clprefix + runName,
tests: current.total,
time: current.duration time: current.duration
}); });

View File

@ -176,20 +176,37 @@ const makeResults = function(testname) {
return function(status, message) { return function(status, message) {
let duration = time() - startTime; let duration = time() - startTime;
let results;
let results = { if (status) {
status: status, let result;
duration: duration,
total: 1, try {
failed: status ? 0 : 1, result = JSON.parse(fs.read("testresult.json"));
'testing.js': {
if ((typeof result[0] === 'object') &&
result[0].hasOwnProperty('status')) {
results = result[0];
}
} catch (x) {}
}
if (results === undefined) {
results = {
status: status, status: status,
duration: duration duration: duration,
} total: 1,
}; failed: status ? 0 : 1,
'testing.js': {
status: status,
duration: duration
}
};
if (message) { if (message) {
results['testing.js'].message = message; results['testing.js'].message = message;
}
} }
let full = {}; let full = {};
@ -3794,7 +3811,7 @@ function unitTest(cases, options) {
_.defaults(options, optionsDefaults); _.defaults(options, optionsDefaults);
if (cases === undefined) { if (cases === undefined || cases.length === 0) {
printUsage(); printUsage();
print('FATAL: "which" is undefined\n'); print('FATAL: "which" is undefined\n');