mirror of https://github.com/nodejs/node.git
Merge remote-tracking branch 'ry/v0.10'
commit
cece100082
|
@ -18,28 +18,30 @@ if (module === require.main) {
|
||||||
var spawn = require('child_process').spawn;
|
var spawn = require('child_process').spawn;
|
||||||
|
|
||||||
runBenchmarks();
|
runBenchmarks();
|
||||||
|
}
|
||||||
|
|
||||||
function runBenchmarks() {
|
function runBenchmarks() {
|
||||||
var test = tests.shift();
|
var test = tests.shift();
|
||||||
if (!test)
|
if (!test)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (test.match(/^[\._]/))
|
if (test.match(/^[\._]/))
|
||||||
return process.nextTick(runBenchmarks);
|
return process.nextTick(runBenchmarks);
|
||||||
|
|
||||||
console.error(type + '/' + test);
|
console.error(type + '/' + test);
|
||||||
test = path.resolve(dir, test);
|
test = path.resolve(dir, test);
|
||||||
|
|
||||||
var child = spawn(process.execPath, [ test ], { stdio: 'inherit' });
|
var a = process.execArgv || [];
|
||||||
child.on('close', function(code) {
|
a.push(test);
|
||||||
if (code)
|
var child = spawn(process.execPath, a, { stdio: 'inherit' });
|
||||||
process.exit(code);
|
child.on('close', function(code) {
|
||||||
else {
|
if (code)
|
||||||
console.log('');
|
process.exit(code);
|
||||||
runBenchmarks();
|
else {
|
||||||
}
|
console.log('');
|
||||||
});
|
runBenchmarks();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.createBenchmark = function(fn, options) {
|
exports.createBenchmark = function(fn, options) {
|
||||||
|
|
Loading…
Reference in New Issue