about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-01-11 17:50:29 -0600
committerbinarycat <binarycat@envs.net>2025-01-11 17:50:29 -0600
commit0962afaa8f1f0a84a298e10b68457fdfca3dfad5 (patch)
tree09ed5c8dcf09a8f1bba9a42a6c10b349a0140fcc
parent251206c27b619ccf3a08e2ac4c525dc343f08492 (diff)
downloadrust-0962afaa8f1f0a84a298e10b68457fdfca3dfad5.tar.gz
rust-0962afaa8f1f0a84a298e10b68457fdfca3dfad5.zip
clean up code related to the rustdoc-js test suite
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 914260e38d1..3688065b20b 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -30,6 +30,7 @@ use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
 use crate::{CLang, DocTests, GitRepo, Mode, PathSet, envify};
 
 const ADB_TEST_DIR: &str = "/data/local/tmp/work";
+const RUSTDOC_JS: &str = "rustdoc-js";
 
 /// Runs `cargo test` on various internal tools used by bootstrap.
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -914,8 +915,8 @@ impl Step for RustdocJSNotStd {
         builder.ensure(Compiletest {
             compiler: self.compiler,
             target: self.target,
-            mode: "js-doc-test",
-            suite: "rustdoc-js",
+            mode: RUSTDOC_JS,
+            suite: RUSTDOC_JS,
             path: "tests/rustdoc-js",
             compare_mode: None,
         });
@@ -1726,7 +1727,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         cmd.arg("--minicore-path")
             .arg(builder.src.join("tests").join("auxiliary").join("minicore.rs"));
 
-        let is_rustdoc = suite.ends_with("rustdoc-ui") || suite.ends_with("rustdoc-js");
+        let is_rustdoc = suite == "rustdoc-ui" || suite == RUSTDOC_JS;
 
         if mode == "run-make" {
             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
         if mode == "rustdoc"
             || mode == "run-make"
             || (mode == "ui" && is_rustdoc)
-            || mode == "js-doc-test"
+            || mode == RUSTDOC_JS
             || mode == "rustdoc-json"
             || suite == "coverage-run-rustdoc"
         {
@@ -1826,8 +1827,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
 
         if let Some(ref nodejs) = builder.config.nodejs {
             cmd.arg("--nodejs").arg(nodejs);
-        } else if mode == "js-doc-test" {
-            panic!("need nodejs to run js-doc-test suite");
+        } else if mode == RUSTDOC_JS {
+            panic!("need nodejs to run rustdoc-js suite");
         }
         if let Some(ref npm) = builder.config.npm {
             cmd.arg("--npm").arg(npm);