@@ -30,6 +30,7 @@ use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
30
30
use crate :: { CLang , DocTests , GitRepo , Mode , PathSet , envify} ;
31
31
32
32
const ADB_TEST_DIR : & str = "/data/local/tmp/work" ;
33
+ const RUSTDOC_JS : & str = "rustdoc-js" ;
33
34
34
35
/// Runs `cargo test` on various internal tools used by bootstrap.
35
36
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
@@ -914,8 +915,8 @@ impl Step for RustdocJSNotStd {
914
915
builder. ensure ( Compiletest {
915
916
compiler : self . compiler ,
916
917
target : self . target ,
917
- mode : "js-doc-test" ,
918
- suite : "rustdoc-js" ,
918
+ mode : RUSTDOC_JS ,
919
+ suite : RUSTDOC_JS ,
919
920
path : "tests/rustdoc-js" ,
920
921
compare_mode : None ,
921
922
} ) ;
@@ -1726,7 +1727,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1726
1727
cmd. arg ( "--minicore-path" )
1727
1728
. arg ( builder. src . join ( "tests" ) . join ( "auxiliary" ) . join ( "minicore.rs" ) ) ;
1728
1729
1729
- let is_rustdoc = suite. ends_with ( "rustdoc-ui" ) || suite. ends_with ( "rustdoc-js" ) ;
1730
+ let is_rustdoc = suite == "rustdoc-ui" || suite == RUSTDOC_JS ;
1730
1731
1731
1732
if mode == "run-make" {
1732
1733
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
1754
1755
if mode == "rustdoc"
1755
1756
|| mode == "run-make"
1756
1757
|| ( mode == "ui" && is_rustdoc)
1757
- || mode == "js-doc-test"
1758
+ || mode == RUSTDOC_JS
1758
1759
|| mode == "rustdoc-json"
1759
1760
|| suite == "coverage-run-rustdoc"
1760
1761
{
@@ -1826,8 +1827,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1826
1827
1827
1828
if let Some ( ref nodejs) = builder. config . nodejs {
1828
1829
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" ) ;
1831
1832
}
1832
1833
if let Some ( ref npm) = builder. config . npm {
1833
1834
cmd. arg ( "--npm" ) . arg ( npm) ;
0 commit comments