@@ -430,12 +430,12 @@ pub struct RustdocJS {
430
430
}
431
431
432
432
impl Step for RustdocJS {
433
- type Output = PathBuf ;
433
+ type Output = ( ) ;
434
434
const DEFAULT : bool = true ;
435
435
const ONLY_HOSTS : bool = true ;
436
436
437
437
fn should_run ( run : ShouldRun ) -> ShouldRun {
438
- run. path ( "node " )
438
+ run. path ( "src/tests/rustdoc-js " )
439
439
}
440
440
441
441
fn make_run ( run : RunConfig ) {
@@ -444,17 +444,11 @@ impl Step for RustdocJS {
444
444
} ) ;
445
445
}
446
446
447
- fn run ( self , _: & Builder ) {
448
- let cmd = if cfg ! ( target_os = "windows" ) {
449
- let command = Command :: new ( "cmd" ) ;
450
- command. args ( & [ "/C" , "node src/tools/rustdoc-js/tester.js" ] ) ;
451
- command
452
- } else {
453
- let command = Command :: new ( "sh" ) ;
454
- command. args ( & [ "-c" , "node src/tools/rustdoc-js/tester.js" ] ) ;
455
- command
456
- } ;
457
- builder. run ( cmd) ;
447
+ fn run ( self , builder : & Builder ) {
448
+ let nodejs = builder. config . nodejs . clone ( ) ;
449
+ let mut command = Command :: new ( & nodejs. expect ( "no nodejs found" ) ) ;
450
+ command. args ( & [ "src/tools/rustdoc-js/tester.js" , & * self . host ] ) ;
451
+ builder. run ( & mut command) ;
458
452
}
459
453
}
460
454
@@ -604,7 +598,6 @@ static HOST_COMPILETESTS: &[Test] = &[
604
598
} ,
605
599
Test { path : "src/test/run-make" , mode : "run-make" , suite : "run-make" } ,
606
600
Test { path : "src/test/rustdoc" , mode : "rustdoc" , suite : "rustdoc" } ,
607
- Test { path : "src/test/rustdoc-js" , mode : "rustdoc-js" , suite : "rustdoc-js" } ,
608
601
609
602
Test { path : "src/test/pretty" , mode : "pretty" , suite : "pretty" } ,
610
603
Test { path : "src/test/run-pass/pretty" , mode : "pretty" , suite : "run-pass" } ,
0 commit comments