fix perf test to use process signal events, added debug info for failing Windows tests

This commit is contained in:
jfdenise 2014-01-20 09:38:34 +01:00
parent 2a9a020cd0
commit 7b154c9ee5
2 changed files with 5 additions and 4 deletions

View File

@ -38,7 +38,7 @@ function startPerf(fstart, time) {
for(var arg in process.argv) {
switch(process.argv[arg]) {
case '-duration': {
var i = +arg + 1
var i = +arg + 1
duration = process.argv[i]
break
}
@ -96,7 +96,7 @@ function dumpResults() {
exports.dumpResults = dumpResults;
function canContinue() {
if (!go) {
doExit();
doExit();
}
return true;
}
@ -172,6 +172,6 @@ function run() {
// Killing the process dumps current status
// only when using avatarjs
if(process.signals) {
process.signals.setSignalCallback(doExit);
process.on('SIGINT', doExit);
process.signals.start('SIGINT');
}

View File

@ -120,7 +120,7 @@ process.version;
process.on('exit', function() {
SCRIPT_OK = true;
});
function testThrow(f) {
try {
f();
@ -129,6 +129,7 @@ function testThrow(f) {
if (ex instanceof java.security.AccessControlException) {
print("Caught expected exception " + ex);
} else {
print("Root exception " + ex.stack);
throw ex;
}
}