1
0
Fork 0

Catch exceptions from testing.js

This commit is contained in:
Willi Goesgens 2014-09-25 15:47:02 +02:00
parent 0a3877505c
commit cf72047b30
1 changed files with 10 additions and 1 deletions

View File

@ -81,13 +81,22 @@ function main (argv) {
}
var test = argv[1];
var options = {};
var r;
if (argv.length >= 3) {
options = JSON.parse(argv[2]);
}
options.jsonReply = true;
var UnitTest = require("org/arangodb/testing");
start_pretty_print();
var r = UnitTest.UnitTest(test,options);
try {
r = UnitTest.UnitTest(test,options);
}
catch (x) {
print("Caught exception during test execution!");
print(x.message);
print(JSON.stringify(r);
}
fs.write("UNITTEST_RESULT.json",JSON.stringify(r));
fs.write("UNITTEST_RESULT_SUMMARY.txt",JSON.stringify(r.all_ok));
try {