Rename tests/rustdoc into tests/rustdoc-html

This commit is contained in:
Guillaume Gomez
2026-01-03 13:06:54 +01:00
parent d9617c8d9a
commit a928f3352d
1076 changed files with 69 additions and 60 deletions

View File

@@ -21,7 +21,7 @@ ignore = [
"/tests/pretty/", # These tests are very sensitive to source code layout.
"/tests/run-make/export", # These tests contain syntax errors.
"/tests/run-make/translation/test.rs", # This test contains syntax errors.
"/tests/rustdoc/", # Some have syntax errors, some are whitespace-sensitive.
"/tests/rustdoc-html/", # Some have syntax errors, some are whitespace-sensitive.
"/tests/rustdoc-gui/", # Some tests are sensitive to source code layout.
"/tests/rustdoc-ui/", # Some have syntax errors, some are whitespace-sensitive.
"/tests/ui/", # Some have syntax errors, some are whitespace-sensitive.

View File

@@ -1582,10 +1582,10 @@ test!(UiFullDeps {
IS_HOST: true,
});
test!(Rustdoc {
path: "tests/rustdoc",
mode: CompiletestMode::Rustdoc,
suite: "rustdoc",
test!(RustdocHtml {
path: "tests/rustdoc-html",
mode: CompiletestMode::RustdocHtml,
suite: "rustdoc-html",
default: true,
IS_HOST: true,
});
@@ -1969,7 +1969,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
if matches!(
mode,
CompiletestMode::RunMake
| CompiletestMode::Rustdoc
| CompiletestMode::RustdocHtml
| CompiletestMode::RustdocJs
| CompiletestMode::RustdocJson
) || matches!(suite, "rustdoc-ui" | "coverage-run-rustdoc")
@@ -2758,7 +2758,7 @@ impl Step for ErrorIndex {
fn make_run(run: RunConfig<'_>) {
// error_index_generator depends on librustdoc. Use the compiler that
// is normally used to build rustdoc for other tests (like compiletest
// tests in tests/rustdoc) so that it shares the same artifacts.
// tests in tests/rustdoc-html) so that it shares the same artifacts.
let compilers = RustcPrivateCompilers::new(
run.builder,
run.builder.top_stage,
@@ -3159,7 +3159,7 @@ impl Step for CrateRustdoc {
builder.compiler(builder.top_stage, target)
} else {
// Use the previous stage compiler to reuse the artifacts that are
// created when running compiletest for tests/rustdoc. If this used
// created when running compiletest for tests/rustdoc-html. If this used
// `compiler`, then it would cause rustdoc to be built *again*, which
// isn't really necessary.
builder.compiler_for(builder.top_stage, target, target)

View File

@@ -21,7 +21,7 @@ pub(crate) enum CompiletestMode {
MirOpt,
Pretty,
RunMake,
Rustdoc,
RustdocHtml,
RustdocJs,
RustdocJson,
Ui,
@@ -49,7 +49,7 @@ impl CompiletestMode {
Self::MirOpt => "mir-opt",
Self::Pretty => "pretty",
Self::RunMake => "run-make",
Self::Rustdoc => "rustdoc",
Self::RustdocHtml => "rustdoc-html",
Self::RustdocJs => "rustdoc-js",
Self::RustdocJson => "rustdoc-json",
Self::Ui => "ui",

View File

@@ -31,8 +31,8 @@ pub(crate) const PATH_REMAP: &[(&str, &[&str])] = &[
"tests/pretty",
"tests/run-make",
"tests/run-make-cargo",
"tests/rustdoc",
"tests/rustdoc-gui",
"tests/rustdoc-html",
"tests/rustdoc-js",
"tests/rustdoc-js-std",
"tests/rustdoc-json",

View File

@@ -1,6 +1,5 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
assertion_line: 68
expression: test
---
[Test] test::Tidy
@@ -38,9 +37,9 @@ expression: test
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)
[Test] test::Rustdoc
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
- Suite(test::tests/rustdoc-html)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)

View File

@@ -5,9 +5,6 @@ expression: test librustdoc rustdoc
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})

View File

@@ -0,0 +1,10 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test librustdoc rustdoc-html
---
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc})
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-html)

View File

@@ -2,9 +2,6 @@
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test rustdoc
---
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc})

View File

@@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test rustdoc-html
---
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-html)

View File

@@ -1,6 +1,5 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
assertion_line: 68
expression: test --skip=coverage
---
[Test] test::Tidy
@@ -37,9 +36,9 @@ expression: test --skip=coverage
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)
[Test] test::Rustdoc
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
- Suite(test::tests/rustdoc-html)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)

View File

@@ -38,12 +38,12 @@ expression: test tests
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocGUI
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-gui)
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-html)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)

View File

@@ -35,12 +35,12 @@ expression: test tests --skip=coverage
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocGUI
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-gui)
[Test] test::RustdocHtml
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-html)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)

View File

@@ -169,7 +169,9 @@ declare_tests!(
(x_test_library, "test library"),
(x_test_librustdoc, "test librustdoc"),
(x_test_librustdoc_rustdoc, "test librustdoc rustdoc"),
(x_test_librustdoc_rustdoc_html, "test librustdoc rustdoc-html"),
(x_test_rustdoc, "test rustdoc"),
(x_test_rustdoc_html, "test rustdoc-html"),
(x_test_skip_coverage, "test --skip=coverage"),
// FIXME(Zalathar): This doesn't skip the coverage-map or coverage-run tests.
(x_test_skip_tests, "test --skip=tests"),

View File

@@ -880,7 +880,7 @@ impl<'a> Builder<'a> {
test::Incremental,
test::Debuginfo,
test::UiFullDeps,
test::Rustdoc,
test::RustdocHtml,
test::CoverageRunRustdoc,
test::Pretty,
test::CodegenCranelift,

View File

@@ -2099,7 +2099,7 @@ mod snapshot {
[test] compiletest-debuginfo 1 <host>
[test] compiletest-ui-fulldeps 1 <host>
[build] rustdoc 1 <host>
[test] compiletest-rustdoc 1 <host>
[test] compiletest-rustdoc-html 1 <host>
[test] compiletest-coverage-run-rustdoc 1 <host>
[test] compiletest-pretty 1 <host>
[build] rustc 1 <host> -> std 1 <host>
@@ -2169,7 +2169,7 @@ mod snapshot {
let ctx = TestCtx::new();
insta::assert_snapshot!(
ctx.config("test")
.args(&["ui", "ui-fulldeps", "run-make", "rustdoc", "rustdoc-gui", "incremental"])
.args(&["ui", "ui-fulldeps", "run-make", "rustdoc-html", "rustdoc-gui", "incremental"])
.render_steps(), @r"
[build] llvm <host>
[build] rustc 0 <host> -> rustc 1 <host>
@@ -2180,11 +2180,10 @@ mod snapshot {
[build] rustc 0 <host> -> RunMakeSupport 1 <host>
[build] rustdoc 1 <host>
[test] compiletest-run-make 1 <host>
[test] compiletest-rustdoc 1 <host>
[test] compiletest-rustdoc-html 1 <host>
[build] rustc 0 <host> -> RustdocGUITest 1 <host>
[test] rustdoc-gui 1 <host>
[test] compiletest-incremental 1 <host>
[build] rustc 1 <host> -> rustc 2 <host>
");
}
@@ -2193,7 +2192,7 @@ mod snapshot {
let ctx = TestCtx::new();
insta::assert_snapshot!(
ctx.config("test")
.args(&["ui", "ui-fulldeps", "run-make", "rustdoc", "rustdoc-gui", "incremental"])
.args(&["ui", "ui-fulldeps", "run-make", "rustdoc-html", "rustdoc-gui", "incremental"])
.stage(2)
.render_steps(), @r"
[build] llvm <host>
@@ -2208,11 +2207,10 @@ mod snapshot {
[build] rustc 0 <host> -> RunMakeSupport 1 <host>
[build] rustdoc 2 <host>
[test] compiletest-run-make 2 <host>
[test] compiletest-rustdoc 2 <host>
[test] compiletest-rustdoc-html 2 <host>
[build] rustc 0 <host> -> RustdocGUITest 1 <host>
[test] rustdoc-gui 2 <host>
[test] compiletest-incremental 2 <host>
[build] rustdoc 1 <host>
");
}
@@ -2241,12 +2239,11 @@ mod snapshot {
[build] rustc 0 <host> -> RunMakeSupport 1 <host>
[build] rustdoc 2 <host>
[test] compiletest-run-make 2 <target1>
[test] compiletest-rustdoc 2 <target1>
[build] rustc 1 <host> -> rustc 2 <target1>
[build] rustdoc 1 <host>
[build] rustc 0 <host> -> RustdocGUITest 1 <host>
[test] rustdoc-gui 2 <target1>
[test] compiletest-incremental 2 <target1>
[build] rustc 1 <host> -> rustc 2 <target1>
[build] rustdoc 1 <host>
[build] rustc 2 <target1> -> std 2 <target1>
[build] rustdoc 2 <target1>
");
@@ -2283,7 +2280,7 @@ mod snapshot {
[build] rustc 2 <host> -> rustc 3 <host>
[test] compiletest-ui-fulldeps 2 <host>
[build] rustdoc 2 <host>
[test] compiletest-rustdoc 2 <host>
[test] compiletest-rustdoc-html 2 <host>
[test] compiletest-coverage-run-rustdoc 2 <host>
[test] compiletest-pretty 2 <host>
[build] rustc 2 <host> -> std 2 <host>

View File

@@ -27,7 +27,7 @@ runners:
<<: *base-job
envs:
env-x86_64-apple-tests: &env-x86_64-apple-tests
SCRIPT: ./x.py check compiletest && ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc -- --exact
SCRIPT: ./x.py check compiletest && ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc-html -- --exact
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
# Ensure that host tooling is tested on our minimum supported macOS version.

View File

@@ -45,7 +45,7 @@ ENV SCRIPT python3 ../x.py \
--test-codegen-backend gcc \
--skip tests/coverage \
--skip tests/coverage-run-rustdoc \
--skip tests/rustdoc \
--skip tests/rustdoc-html \
--skip tests/rustdoc-gui \
--skip tests/rustdoc-js \
--skip tests/rustdoc-js-std \

View File

@@ -882,7 +882,8 @@ impl<'item> DocVisitor<'item> for TypeImplCollector<'_, '_, 'item> {
//
// FIXME(lazy_type_alias): Once the feature is complete or stable, rewrite this
// to use type unification.
// Be aware of `tests/rustdoc/type-alias/deeply-nested-112515.rs` which might regress.
// Be aware of `tests/rustdoc-html/type-alias/deeply-nested-112515.rs` which might
// regress.
let Some(impl_did) = impl_item_id.as_def_id() else { continue };
let for_ty = self.cx.tcx().type_of(impl_did).skip_binder();
let reject_cx = DeepRejectCtxt::relate_infer_infer(self.cx.tcx());

View File

@@ -18,7 +18,7 @@ string_enum! {
Pretty => "pretty",
DebugInfo => "debuginfo",
Codegen => "codegen",
Rustdoc => "rustdoc",
RustdocHtml => "rustdoc-html",
RustdocJson => "rustdoc-json",
CodegenUnits => "codegen-units",
Incremental => "incremental",
@@ -69,7 +69,7 @@ string_enum! {
Pretty => "pretty",
RunMake => "run-make",
RunMakeCargo => "run-make-cargo",
Rustdoc => "rustdoc",
RustdocHtml => "rustdoc-html",
RustdocGui => "rustdoc-gui",
RustdocJs => "rustdoc-js",
RustdocJsStd=> "rustdoc-js-std",

View File

@@ -552,7 +552,7 @@ fn check_directive<'a>(
let is_known_directive = KNOWN_DIRECTIVE_NAMES_SET.contains(&directive_name)
|| match mode {
TestMode::Rustdoc => KNOWN_HTMLDOCCK_DIRECTIVE_NAMES.contains(&directive_name),
TestMode::RustdocHtml => KNOWN_HTMLDOCCK_DIRECTIVE_NAMES.contains(&directive_name),
TestMode::RustdocJson => KNOWN_JSONDOCCK_DIRECTIVE_NAMES.contains(&directive_name),
_ => false,
};

View File

@@ -630,7 +630,7 @@ fn test_forbidden_revisions_allowed_in_non_filecheck_dir() {
let modes = [
"pretty",
"debuginfo",
"rustdoc",
"rustdoc-html",
"rustdoc-json",
"codegen-units",
"incremental",

View File

@@ -85,7 +85,7 @@ fn parse_config(args: Vec<String>) -> Config {
"",
"mode",
"which sort of compile tests to run",
"pretty | debug-info | codegen | rustdoc \
"pretty | debug-info | codegen | rustdoc-html \
| rustdoc-json | codegen-units | incremental | run-make | ui \
| rustdoc-js | mir-opt | assembly | crashes",
)
@@ -1094,8 +1094,8 @@ fn make_test_name_and_filterable_path(
/// of some other tests's name.
///
/// For example, suppose the test suite contains these two test files:
/// - `tests/rustdoc/primitive.rs`
/// - `tests/rustdoc/primitive/no_std.rs`
/// - `tests/rustdoc-html/primitive.rs`
/// - `tests/rustdoc-html/primitive/no_std.rs`
///
/// The test runner might put the output from those tests in these directories:
/// - `$build/test/rustdoc/primitive/`

View File

@@ -269,7 +269,7 @@ impl<'test> TestCx<'test> {
TestMode::Pretty => self.run_pretty_test(),
TestMode::DebugInfo => self.run_debuginfo_test(),
TestMode::Codegen => self.run_codegen_test(),
TestMode::Rustdoc => self.run_rustdoc_test(),
TestMode::RustdocHtml => self.run_rustdoc_html_test(),
TestMode::RustdocJson => self.run_rustdoc_json_test(),
TestMode::CodegenUnits => self.run_codegen_units_test(),
TestMode::Incremental => self.run_incremental_test(),
@@ -1758,7 +1758,7 @@ impl<'test> TestCx<'test> {
}
TestMode::Pretty
| TestMode::DebugInfo
| TestMode::Rustdoc
| TestMode::RustdocHtml
| TestMode::RustdocJson
| TestMode::RunMake
| TestMode::RustdocJs => {

View File

@@ -3,7 +3,7 @@ use std::process::Command;
use super::{DocKind, TestCx, remove_and_create_dir_all};
impl TestCx<'_> {
pub(super) fn run_rustdoc_test(&self) {
pub(super) fn run_rustdoc_html_test(&self) {
assert!(self.revision.is_none(), "revisions not supported in this test suite");
let out_dir = self.output_base_dir();

View File

@@ -50,7 +50,7 @@ fn incomplete_config_for_rustdoc_gui_test() -> Config {
//
// For instance, `//@ ignore-stage1` will not work at all.
Config {
mode: TestMode::Rustdoc,
mode: TestMode::RustdocHtml,
// E.g. this has no sensible default tbh.
suite: TestSuite::Ui,

View File

@@ -123,7 +123,7 @@ llvm-config = "{llvm_config}"
"tests/run-make/rust-lld-x86_64-unknown-linux-gnu-dist",
"tests/ui",
"tests/crashes",
"tests/rustdoc",
"tests/rustdoc-html",
];
for test_path in env.skipped_tests() {
args.extend(["--skip", test_path]);

View File

@@ -107,7 +107,7 @@ pub fn check(
&tests_path.join("ui"),
&tests_path.join("ui-fulldeps"),
&tests_path.join("rustdoc-ui"),
&tests_path.join("rustdoc"),
&tests_path.join("rustdoc-html"),
],
|path, _is_dir| {
filter_dirs(path)

Some files were not shown because too many files have changed in this diff Show More