diff options
author | isaacs <i@izs.me> | 2013-08-31 11:29:51 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-08-31 11:29:51 -0700 |
commit | cece100082e37ef58262584356de70d814824439 (patch) | |
tree | f57d701e7ac7fe26a0cafdfef661af0bf7360792 /benchmark | |
parent | 10ccbd501f8a3122f0fa7359d1afc0d02da1af36 (diff) | |
parent | 01f3b468a917ba89c3deab0e5f90e3f37f3dc169 (diff) | |
download | nodejs-cece100082e37ef58262584356de70d814824439.tar.gz nodejs-cece100082e37ef58262584356de70d814824439.tar.bz2 nodejs-cece100082e37ef58262584356de70d814824439.zip |
Merge remote-tracking branch 'ry/v0.10'
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/common.js | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/benchmark/common.js b/benchmark/common.js index bfbb05487..7cd2dfb6d 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -18,28 +18,30 @@ if (module === require.main) { var spawn = require('child_process').spawn; runBenchmarks(); +} - function runBenchmarks() { - var test = tests.shift(); - if (!test) - return; +function runBenchmarks() { + var test = tests.shift(); + if (!test) + return; - if (test.match(/^[\._]/)) - return process.nextTick(runBenchmarks); + if (test.match(/^[\._]/)) + return process.nextTick(runBenchmarks); - console.error(type + '/' + test); - test = path.resolve(dir, test); + console.error(type + '/' + test); + test = path.resolve(dir, test); - var child = spawn(process.execPath, [ test ], { stdio: 'inherit' }); - child.on('close', function(code) { - if (code) - process.exit(code); - else { - console.log(''); - runBenchmarks(); - } - }); - } + var a = process.execArgv || []; + a.push(test); + var child = spawn(process.execPath, a, { stdio: 'inherit' }); + child.on('close', function(code) { + if (code) + process.exit(code); + else { + console.log(''); + runBenchmarks(); + } + }); } exports.createBenchmark = function(fn, options) { |