@@ -430,12 +430,12 @@ pub struct RustdocJS {
430430}
431431
432432impl Step for RustdocJS {
433- type Output = PathBuf ;
433+ type Output = ( ) ;
434434 const DEFAULT : bool = true ;
435435 const ONLY_HOSTS : bool = true ;
436436
437437 fn should_run ( run : ShouldRun ) -> ShouldRun {
438- run. path ( "node " )
438+ run. path ( "src/tests/rustdoc-js " )
439439 }
440440
441441 fn make_run ( run : RunConfig ) {
@@ -444,17 +444,11 @@ impl Step for RustdocJS {
444444 } ) ;
445445 }
446446
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) ;
458452 }
459453}
460454
@@ -604,7 +598,6 @@ static HOST_COMPILETESTS: &[Test] = &[
604598 } ,
605599 Test { path : "src/test/run-make" , mode : "run-make" , suite : "run-make" } ,
606600 Test { path : "src/test/rustdoc" , mode : "rustdoc" , suite : "rustdoc" } ,
607- Test { path : "src/test/rustdoc-js" , mode : "rustdoc-js" , suite : "rustdoc-js" } ,
608601
609602 Test { path : "src/test/pretty" , mode : "pretty" , suite : "pretty" } ,
610603 Test { path : "src/test/run-pass/pretty" , mode : "pretty" , suite : "run-pass" } ,
0 commit comments