Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: for this PR, could you just inline the constant as strings? String checking is not ideal, but let's keep it consistent with the other test modes/suites for the time being.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah alright, will do.


/// Runs `cargo test` on various internal tools used by bootstrap.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: lol


if mode == "run-make" {
let cargo_path = if builder.top_stage == 0 {
Expand Down Expand Up @@ -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"
{
Expand Down Expand Up @@ -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);
Expand Down
Loading