diff options
| author | Rune Tynan <runetynan@gmail.com> | 2021-01-19 19:15:04 -0500 |
|---|---|---|
| committer | Rune Tynan <runetynan@gmail.com> | 2021-01-19 19:28:28 -0500 |
| commit | ba6803e6b4f397c6e13e58595b6f1f7ef7c4a00a (patch) | |
| tree | c542ca2f1eff86a72ac03de2afb3c5f4e3ec7906 /src | |
| parent | 728ffc8c03917b374dbee47d81799544059208b7 (diff) | |
| download | rust-ba6803e6b4f397c6e13e58595b6f1f7ef7c4a00a.tar.gz rust-ba6803e6b4f397c6e13e58595b6f1f7ef7c4a00a.zip | |
No longer require unstable for jsondocck, only build it for json tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/test.rs | 9 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/common.rs | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/main.rs | 4 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 2811349809e..335a1731002 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1011,6 +1011,13 @@ note: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler)); } + if mode == "rustdoc-json" { + // Use the beta compiler for jsondocck + let json_compiler = compiler.with_stage(0); + cmd.arg("--jsondocck-path") + .arg(builder.ensure(tool::JsonDocCk { compiler: json_compiler, target })); + } + if mode == "run-make" && suite.ends_with("fulldeps") { cmd.arg("--rust-demangler-path").arg(builder.tool_exe(Tool::RustDemangler)); } @@ -1072,8 +1079,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--docck-python").arg(builder.python()); - cmd.arg("--jsondocck-path").arg(builder.ensure(tool::JsonDocCk { compiler, target })); - if builder.config.build.ends_with("apple-darwin") { // Force /usr/bin/python3 on macOS for LLDB tests because we're loading the // LLDB plugin's compiled module which only works with the system python diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 999ce71ff6e..835b8beb0e7 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -367,7 +367,7 @@ bootstrap_tool!( RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes"; ExpandYamlAnchors, "src/tools/expand-yaml-anchors", "expand-yaml-anchors"; LintDocs, "src/tools/lint-docs", "lint-docs"; - JsonDocCk, "src/tools/jsondocck", "jsondocck", is_unstable_tool = true; + JsonDocCk, "src/tools/jsondocck", "jsondocck"; ); #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)] diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 4cefb562b13..5424889a838 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -199,7 +199,7 @@ pub struct Config { pub docck_python: String, /// The jsondocck executable. - pub jsondocck_path: String, + pub jsondocck_path: Option<String>, /// The LLVM `FileCheck` binary path. pub llvm_filecheck: Option<PathBuf>, diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 8cb0342c1f8..688cf930033 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -60,7 +60,7 @@ pub fn parse_config(args: Vec<String>) -> Config { .optopt("", "rust-demangler-path", "path to rust-demangler to use in tests", "PATH") .reqopt("", "lldb-python", "path to python to use for doc tests", "PATH") .reqopt("", "docck-python", "path to python to use for doc tests", "PATH") - .reqopt("", "jsondocck-path", "path to jsondocck to use for doc tests", "PATH") + .optopt("", "jsondocck-path", "path to jsondocck to use for doc tests", "PATH") .optopt("", "valgrind-path", "path to Valgrind executable for Valgrind tests", "PROGRAM") .optflag("", "force-valgrind", "fail if Valgrind tests cannot be run under Valgrind") .optopt("", "run-clang-based-tests-with", "path to Clang executable", "PATH") @@ -208,7 +208,7 @@ pub fn parse_config(args: Vec<String>) -> Config { rust_demangler_path: matches.opt_str("rust-demangler-path").map(PathBuf::from), lldb_python: matches.opt_str("lldb-python").unwrap(), docck_python: matches.opt_str("docck-python").unwrap(), - jsondocck_path: matches.opt_str("jsondocck-path").unwrap(), + jsondocck_path: matches.opt_str("jsondocck-path"), valgrind_path: matches.opt_str("valgrind-path"), force_valgrind: matches.opt_present("force-valgrind"), run_clang_based_tests_with: matches.opt_str("run-clang-based-tests-with"), diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index b15a563a930..5608ff98417 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2490,7 +2490,7 @@ impl<'test> TestCx<'test> { let mut json_out = out_dir.join(self.testpaths.file.file_stem().unwrap()); json_out.set_extension("json"); let res = self.cmd2procres( - Command::new(&self.config.jsondocck_path) + Command::new(self.config.jsondocck_path.as_ref().unwrap()) .arg("--doc-dir") .arg(root.join(&out_dir)) .arg("--template") |
