@@ -30,6 +30,7 @@ use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
3030use crate :: { CLang , DocTests , GitRepo , Mode , PathSet , envify} ;
3131
3232const ADB_TEST_DIR : & str = "/data/local/tmp/work" ;
33+ const RUSTDOC_JS : & str = "rustdoc-js" ;
3334
3435/// Runs `cargo test` on various internal tools used by bootstrap.
3536#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
@@ -914,8 +915,8 @@ impl Step for RustdocJSNotStd {
914915 builder. ensure ( Compiletest {
915916 compiler : self . compiler ,
916917 target : self . target ,
917- mode : "js-doc-test" ,
918- suite : "rustdoc-js" ,
918+ mode : RUSTDOC_JS ,
919+ suite : RUSTDOC_JS ,
919920 path : "tests/rustdoc-js" ,
920921 compare_mode : None ,
921922 } ) ;
@@ -1726,7 +1727,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17261727 cmd. arg ( "--minicore-path" )
17271728 . arg ( builder. src . join ( "tests" ) . join ( "auxiliary" ) . join ( "minicore.rs" ) ) ;
17281729
1729- let is_rustdoc = suite. ends_with ( "rustdoc-ui" ) || suite. ends_with ( "rustdoc-js" ) ;
1730+ let is_rustdoc = suite == "rustdoc-ui" || suite == RUSTDOC_JS ;
17301731
17311732 if mode == "run-make" {
17321733 let cargo_path = if builder. top_stage == 0 {
@@ -1754,7 +1755,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17541755 if mode == "rustdoc"
17551756 || mode == "run-make"
17561757 || ( mode == "ui" && is_rustdoc)
1757- || mode == "js-doc-test"
1758+ || mode == RUSTDOC_JS
17581759 || mode == "rustdoc-json"
17591760 || suite == "coverage-run-rustdoc"
17601761 {
@@ -1826,8 +1827,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18261827
18271828 if let Some ( ref nodejs) = builder. config . nodejs {
18281829 cmd. arg ( "--nodejs" ) . arg ( nodejs) ;
1829- } else if mode == "js-doc-test" {
1830- panic ! ( "need nodejs to run js-doc-test suite" ) ;
1830+ } else if mode == RUSTDOC_JS {
1831+ panic ! ( "need nodejs to run rustdoc-js suite" ) ;
18311832 }
18321833 if let Some ( ref npm) = builder. config . npm {
18331834 cmd. arg ( "--npm" ) . arg ( npm) ;
0 commit comments