File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,28 +18,30 @@ if (module === require.main) {
1818 var spawn = require ( 'child_process' ) . spawn ;
1919
2020 runBenchmarks ( ) ;
21+ }
2122
22- function runBenchmarks ( ) {
23- var test = tests . shift ( ) ;
24- if ( ! test )
25- return ;
23+ function runBenchmarks ( ) {
24+ var test = tests . shift ( ) ;
25+ if ( ! test )
26+ return ;
2627
27- if ( test . match ( / ^ [ \. _ ] / ) )
28- return process . nextTick ( runBenchmarks ) ;
28+ if ( test . match ( / ^ [ \. _ ] / ) )
29+ return process . nextTick ( runBenchmarks ) ;
2930
30- console . error ( type + '/' + test ) ;
31- test = path . resolve ( dir , test ) ;
31+ console . error ( type + '/' + test ) ;
32+ test = path . resolve ( dir , test ) ;
3233
33- var child = spawn ( process . execPath , [ test ] , { stdio : 'inherit' } ) ;
34- child . on ( 'close' , function ( code ) {
35- if ( code )
36- process . exit ( code ) ;
37- else {
38- console . log ( '' ) ;
39- runBenchmarks ( ) ;
40- }
41- } ) ;
42- }
34+ var a = process . execArgv || [ ] ;
35+ a . push ( test ) ;
36+ var child = spawn ( process . execPath , a , { stdio : 'inherit' } ) ;
37+ child . on ( 'close' , function ( code ) {
38+ if ( code )
39+ process . exit ( code ) ;
40+ else {
41+ console . log ( '' ) ;
42+ runBenchmarks ( ) ;
43+ }
44+ } ) ;
4345}
4446
4547exports . createBenchmark = function ( fn , options ) {
You can’t perform that action at this time.
0 commit comments