-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
clean up code related to the rustdoc-js test suite #135386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0962afa
clean up code related to the rustdoc-js test suite
lolbinarycat a55bc72
don't use a string constant
lolbinarycat 16286ce
rename 'js-doc-test' to 'rustdoc-js' in compiletest
lolbinarycat d5f592a
rename run_js_doc_test to run_rustdoc_js_test
lolbinarycat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah alright, will do.