Skip to content

Commit abdd40d

Browse files
authored
Rollup merge of rust-lang#135386 - lolbinarycat:bootstrap-test-cleanup, r=jieyouxu
clean up code related to the rustdoc-js test suite r? `@jieyouxu`
2 parents cc19b9b + d5f592a commit abdd40d

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/bootstrap/src/core/build_steps/test.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ impl Step for RustdocJSNotStd {
915915
builder.ensure(Compiletest {
916916
compiler: self.compiler,
917917
target: self.target,
918-
mode: "js-doc-test",
918+
mode: "rustdoc-js",
919919
suite: "rustdoc-js",
920920
path: "tests/rustdoc-js",
921921
compare_mode: None,
@@ -1730,7 +1730,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17301730
cmd.arg("--minicore-path")
17311731
.arg(builder.src.join("tests").join("auxiliary").join("minicore.rs"));
17321732

1733-
let is_rustdoc = suite.ends_with("rustdoc-ui") || suite.ends_with("rustdoc-js");
1733+
let is_rustdoc = suite == "rustdoc-ui" || suite == "rustdoc-js";
17341734

17351735
if mode == "run-make" {
17361736
let cargo_path = if builder.top_stage == 0 {
@@ -1758,7 +1758,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17581758
if mode == "rustdoc"
17591759
|| mode == "run-make"
17601760
|| (mode == "ui" && is_rustdoc)
1761-
|| mode == "js-doc-test"
1761+
|| mode == "rustdoc-js"
17621762
|| mode == "rustdoc-json"
17631763
|| suite == "coverage-run-rustdoc"
17641764
{
@@ -1830,8 +1830,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18301830

18311831
if let Some(ref nodejs) = builder.config.nodejs {
18321832
cmd.arg("--nodejs").arg(nodejs);
1833-
} else if mode == "js-doc-test" {
1834-
panic!("need nodejs to run js-doc-test suite");
1833+
} else if mode == "rustdoc-js" {
1834+
panic!("need nodejs to run rustdoc-js suite");
18351835
}
18361836
if let Some(ref npm) = builder.config.npm {
18371837
cmd.arg("--npm").arg(npm);

src/tools/compiletest/src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ string_enum! {
6767
Incremental => "incremental",
6868
RunMake => "run-make",
6969
Ui => "ui",
70-
JsDocTest => "js-doc-test",
70+
RustdocJs => "rustdoc-js",
7171
MirOpt => "mir-opt",
7272
Assembly => "assembly",
7373
CoverageMap => "coverage-map",

src/tools/compiletest/src/header/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ fn test_forbidden_revisions_allowed_in_non_filecheck_dir() {
591591
"codegen-units",
592592
"incremental",
593593
"ui",
594-
"js-doc-test",
594+
"rustdoc-js",
595595
"coverage-map",
596596
"coverage-run",
597597
"crashes",

src/tools/compiletest/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
7171
"which sort of compile tests to run",
7272
"pretty | debug-info | codegen | rustdoc \
7373
| rustdoc-json | codegen-units | incremental | run-make | ui \
74-
| js-doc-test | mir-opt | assembly | crashes",
74+
| rustdoc-js | mir-opt | assembly | crashes",
7575
)
7676
.reqopt(
7777
"",

src/tools/compiletest/src/runtest.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use tracing::*;
1717

1818
use crate::common::{
1919
Assembly, Codegen, CodegenUnits, CompareMode, Config, CoverageMap, CoverageRun, Crashes,
20-
DebugInfo, Debugger, FailMode, Incremental, JsDocTest, MirOpt, PassMode, Pretty, RunMake,
21-
Rustdoc, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, UI_RUN_STDOUT,
20+
DebugInfo, Debugger, FailMode, Incremental, MirOpt, PassMode, Pretty, RunMake, Rustdoc,
21+
RustdocJs, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, UI_RUN_STDOUT,
2222
UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path, incremental_dir,
2323
output_base_dir, output_base_name, output_testname_unique,
2424
};
@@ -269,7 +269,7 @@ impl<'test> TestCx<'test> {
269269
Ui => self.run_ui_test(),
270270
MirOpt => self.run_mir_opt_test(),
271271
Assembly => self.run_assembly_test(),
272-
JsDocTest => self.run_js_doc_test(),
272+
RustdocJs => self.run_rustdoc_js_test(),
273273
CoverageMap => self.run_coverage_map_test(), // see self::coverage
274274
CoverageRun => self.run_coverage_run_test(), // see self::coverage
275275
Crashes => self.run_crash_test(),
@@ -303,7 +303,7 @@ impl<'test> TestCx<'test> {
303303

304304
fn should_compile_successfully(&self, pm: Option<PassMode>) -> bool {
305305
match self.config.mode {
306-
JsDocTest => true,
306+
RustdocJs => true,
307307
Ui => pm.is_some() || self.props.fail_mode > Some(FailMode::Build),
308308
Crashes => false,
309309
Incremental => {
@@ -1627,7 +1627,7 @@ impl<'test> TestCx<'test> {
16271627
Crashes => {
16281628
set_mir_dump_dir(&mut rustc);
16291629
}
1630-
Pretty | DebugInfo | Rustdoc | RustdocJson | RunMake | CodegenUnits | JsDocTest => {
1630+
Pretty | DebugInfo | Rustdoc | RustdocJson | RunMake | CodegenUnits | RustdocJs => {
16311631
// do not use JSON output
16321632
}
16331633
}

src/tools/compiletest/src/runtest/js_doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::process::Command;
33
use super::TestCx;
44

55
impl TestCx<'_> {
6-
pub(super) fn run_js_doc_test(&self) {
6+
pub(super) fn run_rustdoc_js_test(&self) {
77
if let Some(nodejs) = &self.config.nodejs {
88
let out_dir = self.output_base_dir();
99

0 commit comments

Comments
 (0)