@@ -612,6 +612,50 @@ impl Step for RustdocJS {
612
612
}
613
613
}
614
614
615
+ #[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
616
+ pub struct RustdocJSNotStd {
617
+ pub host : Interned < String > ,
618
+ pub target : Interned < String > ,
619
+ pub compiler : Compiler ,
620
+ }
621
+
622
+ impl Step for RustdocJSNotStd {
623
+ type Output = ( ) ;
624
+ const DEFAULT : bool = true ;
625
+ const ONLY_HOSTS : bool = true ;
626
+
627
+ fn should_run ( run : ShouldRun ) -> ShouldRun {
628
+ run. path ( "src/test/rustdoc-js-not-std" )
629
+ }
630
+
631
+ fn make_run ( run : RunConfig ) {
632
+ let compiler = run. builder . compiler ( run. builder . top_stage , run. host ) ;
633
+ run. builder . ensure ( RustdocJSNotStd {
634
+ host : run. host ,
635
+ target : run. target ,
636
+ compiler,
637
+ } ) ;
638
+ }
639
+
640
+ fn run ( self , builder : & Builder ) {
641
+ if let Some ( ref nodejs) = builder. config . nodejs {
642
+ let mut command = Command :: new ( nodejs) ;
643
+ command. args ( & [ "src/tools/rustdoc-js-not-std/tester.js" ,
644
+ & * self . host ,
645
+ builder. top_stage . to_string ( ) . as_str ( ) ] ) ;
646
+ builder. ensure ( crate :: doc:: Std {
647
+ target : self . target ,
648
+ stage : builder. top_stage ,
649
+ } ) ;
650
+ builder. run ( & mut command) ;
651
+ } else {
652
+ builder. info (
653
+ "No nodejs found, skipping \" src/test/rustdoc-js-not-std\" tests"
654
+ ) ;
655
+ }
656
+ }
657
+ }
658
+
615
659
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
616
660
pub struct RustdocUi {
617
661
pub host : Interned < String > ,
0 commit comments