@@ -313,9 +313,9 @@ function exec(cmd, completeHandler) {
313
313
complete ( ) ;
314
314
} ) ;
315
315
ex . addListener ( "error" , function ( e , status ) {
316
- process . stderr . write ( status ) ;
317
- process . stderr . write ( e ) ;
318
- complete ( ) ;
316
+ process . stderr . write ( status ) ;
317
+ process . stderr . write ( e ) ;
318
+ complete ( ) ;
319
319
} )
320
320
try {
321
321
ex . run ( ) ;
@@ -378,9 +378,9 @@ task("runtests", ["tests", builtLocalDirectory], function() {
378
378
379
379
desc ( "Generates code coverage data via instanbul" )
380
380
task ( "generate-code-coverage" , [ "tests" , builtLocalDirectory ] , function ( ) {
381
- var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run ;
382
- console . log ( cmd ) ;
383
- exec ( cmd ) ;
381
+ var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run ;
382
+ console . log ( cmd ) ;
383
+ exec ( cmd ) ;
384
384
} , { async : true } ) ;
385
385
386
386
// Browser tests
@@ -465,7 +465,7 @@ compileFile(webhostJsPath, [webhostPath], [tscFile, webhostPath].concat(libraryT
465
465
466
466
desc ( "Builds the tsc web host" ) ;
467
467
task ( "webhost" , [ webhostJsPath ] , function ( ) {
468
- jake . cpR ( path . join ( builtLocalDirectory , "lib.d.ts" ) , "tests/webhost/" , { silent : true } ) ;
468
+ jake . cpR ( path . join ( builtLocalDirectory , "lib.d.ts" ) , "tests/webhost/" , { silent : true } ) ;
469
469
} ) ;
470
470
471
471
// Perf compiler
@@ -478,16 +478,17 @@ task("perftsc", [perftscJsPath]);
478
478
// Instrumented compiler
479
479
var loggedIOpath = harnessDirectory + 'loggedIO.ts' ;
480
480
var loggedIOJsPath = builtLocalDirectory + 'loggedIO.js' ;
481
- file ( loggedIOJsPath , [ builtLocalDirectory ] , function ( ) {
482
- var temp = builtLocalDirectory + 'temp' ;
481
+ file ( loggedIOJsPath , [ builtLocalDirectory , loggedIOpath ] , function ( ) {
482
+ var temp = builtLocalDirectory + 'temp' ;
483
483
jake . mkdirP ( temp ) ;
484
484
var options = "--outdir " + temp + ' ' + loggedIOpath ;
485
485
var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " " ;
486
486
console . log ( cmd + "\n" ) ;
487
487
var ex = jake . createExec ( [ cmd ] ) ;
488
488
ex . addListener ( "cmdEnd" , function ( ) {
489
- fs . renameSync ( temp + '/harness/loggedIO.js' , loggedIOJsPath ) ;
490
- jake . rmRf ( temp ) ;
489
+ fs . renameSync ( temp + '/harness/loggedIO.js' , loggedIOJsPath ) ;
490
+ jake . rmRf ( temp ) ;
491
+ complete ( ) ;
491
492
} ) ;
492
493
ex . run ( ) ;
493
494
} , { async : true } ) ;
@@ -498,12 +499,11 @@ compileFile(instrumenterJsPath, [instrumenterPath], [tscFile, instrumenterPath],
498
499
499
500
desc ( "Builds an instrumented tsc.js" ) ;
500
501
task ( 'tsc-instrumented' , [ loggedIOJsPath , instrumenterJsPath , tscFile ] , function ( ) {
501
- var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
502
- console . log ( cmd ) ;
502
+ var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
503
+ console . log ( cmd ) ;
503
504
var ex = jake . createExec ( [ cmd ] ) ;
504
- ex . addListener ( "error" , function ( e ) {
505
- console . log ( 'error running instrumenter' ) ;
506
- console . log ( e ) ;
505
+ ex . addListener ( "cmdEnd" , function ( ) {
506
+ complete ( ) ;
507
507
} ) ;
508
- ex . run ( ) ;
509
- } , { async : true } ) ;
508
+ ex . run ( ) ;
509
+ } , { async : true } ) ;
0 commit comments