diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-01 21:06:35 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-16 23:37:11 +0200 |
| commit | b2192ae157eab3b83d7cbc42d2e08925cbdfd8b6 (patch) | |
| tree | bb68db0f1f320836898202494ad2140ecef13ae3 /src/bootstrap/test.rs | |
| parent | a6fefdecdfff6641111ff6446f73d8364459e1f0 (diff) | |
| download | rust-b2192ae157eab3b83d7cbc42d2e08925cbdfd8b6.tar.gz rust-b2192ae157eab3b83d7cbc42d2e08925cbdfd8b6.zip | |
Add rustdoc-ui test suite
Diffstat (limited to 'src/bootstrap/test.rs')
| -rw-r--r-- | src/bootstrap/test.rs | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index e7610976f8e..992dec5217d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -886,8 +886,12 @@ impl Step for Compiletest { cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target)); cmd.arg("--rustc-path").arg(builder.rustc(compiler)); + let is_rustdoc_ui = suite.ends_with("rustdoc-ui"); + // Avoid depending on rustdoc when we don't need it. - if mode == "rustdoc" || (mode == "run-make" && suite.ends_with("fulldeps")) { + if mode == "rustdoc" || + (mode == "run-make" && suite.ends_with("fulldeps")) || + (mode == "ui" && is_rustdoc_ui) { cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler.host)); } @@ -903,14 +907,24 @@ impl Step for Compiletest { cmd.arg("--nodejs").arg(nodejs); } - let mut flags = vec!["-Crpath".to_string()]; - if build.config.rust_optimize_tests { - flags.push("-O".to_string()); + let mut flags = if is_rustdoc_ui { + Vec::new() + } else { + vec!["-Crpath".to_string()] + }; + if !is_rustdoc_ui { + if build.config.rust_optimize_tests { + flags.push("-O".to_string()); + } + if build.config.rust_debuginfo_tests { + flags.push("-g".to_string()); + } } - if build.config.rust_debuginfo_tests { - flags.push("-g".to_string()); + if !is_rustdoc_ui { + flags.push("-Zmiri -Zunstable-options".to_string()); + } else { + flags.push("-Zunstable-options".to_string()); } - flags.push("-Zunstable-options".to_string()); flags.push(build.config.cmd.rustc_args().join(" ")); if let Some(linker) = build.linker(target) { |
