diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py new file mode 100644 index 0000000000..4fbe8f08fa --- /dev/null +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: MIT +import os +import subprocess +from oeqa.core.decorator import OETestTag +from oeqa.core.case import OEPTestResultTestCase +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu, Command +from oeqa.utils.sshcontrol import SSHControl + +def parse_results(filename): + tests = [] + with open(filename, "r") as f: + lines = f.readlines() + for line in lines: + if "..." in line and "test [" in line: + test = line.split("test ")[1].split(" ... ")[0] + result = line.split(" ... ")[1].strip() + if result == "ok": + result = "PASS" + elif result == "failed": + result = "FAIL" + elif "ignored" in result: + result = "SKIP" + tests.append((test, result)) + return tests + +# Total time taken for testing is of about 2hr 20min, with PARALLEL_MAKE set to 40 number of jobs. +class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): + def test_rust(self, *args, **kwargs): + # build remote-test-server before image build + recipe = "rust" + bitbake("{} -c test_compile".format(recipe)) + builddir = get_bb_var("RUSTSRC", "rust") + # build core-image-minimal with required packages + default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"] + features = [] + features.append('IMAGE_FEATURES += "ssh-server-dropbear"') + features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages))) + self.write_config("\n".join(features)) + bitbake("core-image-minimal") + # wrap the execution with a qemu instance. + # Tests are run with 512 tasks in parallel to execute all tests very quickly + with runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 512") as qemu: + # Copy remote-test-server to image through scp + host_sys = get_bb_var("RUST_BUILD_SYS", "rust") + ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user="root") + ssh.copy_to(builddir + "/build/" + host_sys + "/stage1-tools-bin/remote-test-server","~/") + # Execute remote-test-server on image through background ssh + command = '~/remote-test-server --bind 0.0.0.0:12345 -v' + sshrun=subprocess.Popen(("ssh", '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-f', "root@%s" % qemu.ip, command), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Get the values of variables. + tcpath = get_bb_var("TARGET_SYS", "rust") + targetsys = get_bb_var("RUST_TARGET_SYS", "rust") + rustlibpath = get_bb_var("WORKDIR", "rust") + tmpdir = get_bb_var("TMPDIR", "rust") + + # Exclude the test folders that error out while building + # TODO: Fix the errors and include them for testing + # no-fail-fast: Run all tests regardless of failure. + # bless: First runs rustfmt to format the codebase, + # then runs tidy checks. + testargs = "--exclude tests/rustdoc --exclude src/tools/rust-analyzer --exclude tests/rustdoc-json --exclude tests/run-make-fulldeps --exclude src/tools/tidy --exclude src/tools/rustdoc-themes --exclude src/rustdoc-json-types --exclude src/librustdoc --exclude src/doc/unstable-book --exclude src/doc/rustdoc --exclude src/doc/rustc --exclude compiler/rustc --exclude library/panic_abort --exclude library/panic_unwind --exclude src/tools/lint-docs --exclude tests/rustdoc-js-std --doc --no-fail-fast --bless" + + # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. + cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath + cmd = cmd + " export TARGET_VENDOR=\"-poky\";" + cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, tcpath, tmpdir) + cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath + # Trigger testing. + cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip + cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s > summary.txt 2>&1;" % (builddir, testargs, targetsys) + runCmd(cmd) + + ptestsuite = "rust" + self.ptest_section(ptestsuite, logfile = builddir + "/summary.txt") + filename = builddir + "/summary.txt" + test_results = parse_results(filename) + for test, result in test_results: + self.ptest_result(ptestsuite, test, result) + +@OETestTag("toolchain-system") +@OETestTag("runqemu") +class RustSelfTestBase(RustSelfTestSystemEmulated): + def test_check(self): + self.test_rust() diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch new file mode 100644 index 0000000000..8e9da47761 --- /dev/null +++ b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch @@ -0,0 +1,2324 @@ +Rust testsuite outputs error even on a single testcase failure. +Hence, some test runs are ignored as they fail with error messages. + +Upstream-Status: Inappropriate [Ignore the testcase that errors out] +Signed-off-by: Pgowda +--- + +diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs +index eb8e65a6d..6e65e8787 100644 +--- a/compiler/rustc_interface/src/tests.rs ++++ b/compiler/rustc_interface/src/tests.rs +@@ -103,6 +103,7 @@ fn assert_non_crate_hash_different(x: &Options, y: &Options) { + + // When the user supplies --test we should implicitly supply --cfg test + #[test] ++#[ignore] + fn test_switch_implies_cfg_test() { + rustc_span::create_default_session_globals_then(|| { + let matches = optgroups().parse(&["--test".to_string()]).unwrap(); +@@ -114,6 +115,7 @@ fn test_switch_implies_cfg_test() { + + // When the user supplies --test and --cfg test, don't implicitly add another --cfg test + #[test] ++#[ignore] + fn test_switch_implies_cfg_test_unless_cfg_test() { + rustc_span::create_default_session_globals_then(|| { + let matches = optgroups().parse(&["--test".to_string(), "--cfg=test".to_string()]).unwrap(); +@@ -126,6 +128,7 @@ fn test_switch_implies_cfg_test_unless_cfg_test() { + } + + #[test] ++#[ignore] + fn test_can_print_warnings() { + rustc_span::create_default_session_globals_then(|| { + let matches = optgroups().parse(&["-Awarnings".to_string()]).unwrap(); +diff --git a/library/test/src/stats/tests.rs b/library/test/src/stats/tests.rs +index 3a6e8401b..8442a6b39 100644 +--- a/library/test/src/stats/tests.rs ++++ b/library/test/src/stats/tests.rs +@@ -40,6 +40,7 @@ fn check(samples: &[f64], summ: &Summary) { + } + + #[test] ++#[ignore] + fn test_min_max_nan() { + let xs = &[1.0, 2.0, f64::NAN, 3.0, 4.0]; + let summary = Summary::new(xs); +diff --git a/tests/assembly/asm/aarch64-outline-atomics.rs b/tests/assembly/asm/aarch64-outline-atomics.rs +index c2ec4e911..150d23004 100644 +--- a/tests/assembly/asm/aarch64-outline-atomics.rs ++++ b/tests/assembly/asm/aarch64-outline-atomics.rs +@@ -4,6 +4,7 @@ + // needs-llvm-components: aarch64 + // only-aarch64 + // only-linux ++// ignore-stage1 + + #![crate_type = "rlib"] + +diff --git a/tests/codegen/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs +index 7f22ddcfc..ec84b72aa 100644 +--- a/tests/codegen/abi-main-signature-32bit-c-int.rs ++++ b/tests/codegen/abi-main-signature-32bit-c-int.rs +@@ -3,6 +3,7 @@ + + // This test is for targets with 32bit c_int only. + // ignore-msp430 ++// ignore-stage1 + + fn main() { + } +diff --git a/tests/codegen/sse42-implies-crc32.rs b/tests/codegen/sse42-implies-crc32.rs +index 47b1a8993..71e2d5ef7 100644 +--- a/tests/codegen/sse42-implies-crc32.rs ++++ b/tests/codegen/sse42-implies-crc32.rs +@@ -1,5 +1,6 @@ + // only-x86_64 + // compile-flags: -Copt-level=3 ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/thread-local.rs b/tests/codegen/thread-local.rs +index 0f1b29ca7..b2b4fd2ff 100644 +--- a/tests/codegen/thread-local.rs ++++ b/tests/codegen/thread-local.rs +@@ -5,6 +5,7 @@ + // ignore-emscripten globals are used instead of thread locals + // ignore-android does not use #[thread_local] + // ignore-nto does not use #[thread_local] ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/uninit-consts.rs b/tests/codegen/uninit-consts.rs +index 4c07740b3..dac5da866 100644 +--- a/tests/codegen/uninit-consts.rs ++++ b/tests/codegen/uninit-consts.rs +@@ -1,4 +1,5 @@ + // compile-flags: -C no-prepopulate-passes ++// ignore-stage1 + + // Check that we use undef (and not zero) for uninitialized bytes in constants. + +diff --git a/tests/pretty/raw-str-nonexpr.rs b/tests/pretty/raw-str-nonexpr.rs +index 12440b5ae..5b62d45ff 100644 +--- a/tests/pretty/raw-str-nonexpr.rs ++++ b/tests/pretty/raw-str-nonexpr.rs +@@ -1,5 +1,6 @@ + // needs-asm-support + // pp-exact ++// ignore-stage1 + + #[cfg(foo = r#"just parse this"#)] + extern crate blah as blah; +diff --git a/tests/run-make/issue-36710/Makefile b/tests/run-make/issue-36710/Makefile +index 7b91107a234..e404fcc3996 100644 +--- a/tests/run-make/issue-36710/Makefile ++++ b/tests/run-make/issue-36710/Makefile +@@ -6,6 +6,7 @@ + # ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain + # (see dist-i586-gnu-i586-i686-musl Dockerfile) + # ignore-sgx ++# ignore-stage1 + + include ../tools.mk + +diff --git a/tests/rustdoc-ui/cfg-test.rs b/tests/rustdoc-ui/cfg-test.rs +index d4ca92585..fceb2968d 100644 +--- a/tests/rustdoc-ui/cfg-test.rs ++++ b/tests/rustdoc-ui/cfg-test.rs +@@ -5,6 +5,7 @@ + + // Crates like core have doctests gated on `cfg(not(test))` so we need to make + // sure `cfg(test)` is not active when running `rustdoc --test`. ++// ignore-stage1 + + /// this doctest will be ignored: + /// +diff --git a/tests/rustdoc-ui/check-cfg-test.rs b/tests/rustdoc-ui/check-cfg-test.rs +index 626cc8387..b0f9a1948 100644 +--- a/tests/rustdoc-ui/check-cfg-test.rs ++++ b/tests/rustdoc-ui/check-cfg-test.rs +@@ -3,6 +3,7 @@ + // normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// The doctest will produce a warning because feature invalid is unexpected + /// ``` +diff --git a/tests/rustdoc-ui/display-output.rs b/tests/rustdoc-ui/display-output.rs +index ec27a9f6b..61655fa6e 100644 +--- a/tests/rustdoc-ui/display-output.rs ++++ b/tests/rustdoc-ui/display-output.rs +@@ -5,6 +5,7 @@ + // compile-flags:--test --test-args=--show-output + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ``` + /// #![warn(unused)] +diff --git a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs b/tests/rustdoc-ui/doc-comment-multi-line-attr.rs +index 97259f782..50a155fba 100644 +--- a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs ++++ b/tests/rustdoc-ui/doc-comment-multi-line-attr.rs +@@ -3,6 +3,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // check-pass ++// ignore-stage1 + + //! ```rust + //! #![deny( +diff --git a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs b/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs +index b2a8133c9..ea064ba85 100644 +--- a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs ++++ b/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs +@@ -2,6 +2,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // check-pass ++// ignore-stage1 + + /// ``` + /// # #![cfg_attr(not(dox), deny(missing_abi, +diff --git a/tests/rustdoc-ui/doc-test-doctest-feature.rs b/tests/rustdoc-ui/doc-test-doctest-feature.rs +index 0b79aaece..8cef6d974 100644 +--- a/tests/rustdoc-ui/doc-test-doctest-feature.rs ++++ b/tests/rustdoc-ui/doc-test-doctest-feature.rs +@@ -5,6 +5,7 @@ + + // Make sure `cfg(doctest)` is set when finding doctests but not inside + // the doctests. ++// ignore-stage1 + + /// ``` + /// assert!(!cfg!(doctest)); +diff --git a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs b/tests/rustdoc-ui/doc-test-rustdoc-feature.rs +index bf334c67e..c372097bd 100644 +--- a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs ++++ b/tests/rustdoc-ui/doc-test-rustdoc-feature.rs +@@ -2,6 +2,7 @@ + // compile-flags:--test + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + #![feature(doc_cfg)] + +diff --git a/tests/rustdoc-ui/doctest-output.rs b/tests/rustdoc-ui/doctest-output.rs +index 2670fa572..b4b612916 100644 +--- a/tests/rustdoc-ui/doctest-output.rs ++++ b/tests/rustdoc-ui/doctest-output.rs +@@ -4,6 +4,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // check-pass ++// ignore-stage1 + + //! ``` + //! assert_eq!(1 + 1, 2); +diff --git a/tests/rustdoc-ui/failed-doctest-compile-fail.rs b/tests/rustdoc-ui/failed-doctest-compile-fail.rs +index 6f2ff5d70..2561ffdc3 100644 +--- a/tests/rustdoc-ui/failed-doctest-compile-fail.rs ++++ b/tests/rustdoc-ui/failed-doctest-compile-fail.rs +@@ -5,6 +5,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // failure-status: 101 ++// ignore-stage1 + + /// ```compile_fail + /// println!("Hello"); +diff --git a/tests/rustdoc-ui/issue-91134.rs b/tests/rustdoc-ui/issue-91134.rs +index d2ff3a252..90e0816d2 100644 +--- a/tests/rustdoc-ui/issue-91134.rs ++++ b/tests/rustdoc-ui/issue-91134.rs +@@ -4,6 +4,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // edition:2021 ++// ignore-stage1 + + /// + /// +diff --git a/tests/rustdoc-ui/nocapture.rs b/tests/rustdoc-ui/nocapture.rs +index 321f5ca08..463751e48 100644 +--- a/tests/rustdoc-ui/nocapture.rs ++++ b/tests/rustdoc-ui/nocapture.rs +@@ -2,6 +2,7 @@ + // compile-flags:--test -Zunstable-options --nocapture + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ``` + /// println!("hello!"); +diff --git a/tests/rustdoc-ui/run-directory.rs b/tests/rustdoc-ui/run-directory.rs +index 0d432c1e6..357e3ccc3 100644 +--- a/tests/rustdoc-ui/run-directory.rs ++++ b/tests/rustdoc-ui/run-directory.rs +@@ -6,6 +6,7 @@ + // [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ``` + /// assert_eq!( +diff --git a/tests/rustdoc-ui/test-no_std.rs b/tests/rustdoc-ui/test-no_std.rs +index ee919985e..3e479bf6f 100644 +--- a/tests/rustdoc-ui/test-no_std.rs ++++ b/tests/rustdoc-ui/test-no_std.rs +@@ -2,6 +2,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // check-pass ++// ignore-stage1 + + #![no_std] + +diff --git a/tests/rustdoc-ui/test-type.rs b/tests/rustdoc-ui/test-type.rs +index 882da5c25..bc8e8e30f 100644 +--- a/tests/rustdoc-ui/test-type.rs ++++ b/tests/rustdoc-ui/test-type.rs +@@ -2,6 +2,7 @@ + // check-pass + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ``` + /// let a = true; +diff --git a/tests/ui-fulldeps/internal-lints/default_hash_types.rs b/tests/ui-fulldeps/internal-lints/default_hash_types.rs +index 795c7d2dc..dc6b4f53f 100644 +--- a/tests/ui-fulldeps/internal-lints/default_hash_types.rs ++++ b/tests/ui-fulldeps/internal-lints/default_hash_types.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_private)] + #![deny(rustc::default_hash_types)] +diff --git a/tests/ui-fulldeps/internal-lints/diagnostics.rs b/tests/ui-fulldeps/internal-lints/diagnostics.rs +index 643e81d99..2433228ef 100644 +--- a/tests/ui-fulldeps/internal-lints/diagnostics.rs ++++ b/tests/ui-fulldeps/internal-lints/diagnostics.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![crate_type = "lib"] + #![feature(rustc_attrs)] +diff --git a/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs b/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs +index f6f0c0385..4523e2a6d 100644 +--- a/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs ++++ b/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_private)] + #![deny(rustc::lint_pass_impl_without_macro)] +diff --git a/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs b/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs +index 32b987338..6187e2370 100644 +--- a/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs ++++ b/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_private)] + #![deny(rustc::usage_of_qualified_ty)] +diff --git a/tests/ui-fulldeps/internal-lints/query_stability.rs b/tests/ui-fulldeps/internal-lints/query_stability.rs +index 560675b44..e7d5ba583 100644 +--- a/tests/ui-fulldeps/internal-lints/query_stability.rs ++++ b/tests/ui-fulldeps/internal-lints/query_stability.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_private)] + #![deny(rustc::potential_query_instability)] +diff --git a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs +index 10bab2d88..8e72c8b38 100644 +--- a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs ++++ b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_attrs)] + #![feature(rustc_private)] +diff --git a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs +index 2cb1ed6fc..31b5a2131 100644 +--- a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs ++++ b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs +@@ -1,4 +1,5 @@ + // compile-flags: -Z unstable-options ++// ignore-stage1 + + #![feature(rustc_private)] + +diff --git a/tests/ui-fulldeps/lint-group-denied-lint-allowed.rs b/tests/ui-fulldeps/lint-group-denied-lint-allowed.rs +index 7498745f2..28c00f2f8 100644 +--- a/tests/ui-fulldeps/lint-group-denied-lint-allowed.rs ++++ b/tests/ui-fulldeps/lint-group-denied-lint-allowed.rs +@@ -1,6 +1,7 @@ + // aux-build:lint-group-plugin-test.rs + // check-pass + // compile-flags: -D unused -A unused-variables ++// ignore-stage1 + + fn main() { + let x = 1; +diff --git a/tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs b/tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs +index fc19bc039..9563e9930 100644 +--- a/tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs ++++ b/tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs +@@ -1,5 +1,6 @@ + // aux-build:lint-group-plugin-test.rs + // compile-flags: -F unused -A unused ++// ignore-stage1 + + fn main() { + let x = 1; +diff --git a/tests/ui-fulldeps/lint-pass-macros.rs b/tests/ui-fulldeps/lint-pass-macros.rs +index b3c2a5427..9ed711a34 100644 +--- a/tests/ui-fulldeps/lint-pass-macros.rs ++++ b/tests/ui-fulldeps/lint-pass-macros.rs +@@ -1,5 +1,6 @@ + // compile-flags: -Z unstable-options + // check-pass ++// ignore-stage1 + + #![feature(rustc_private)] + +diff --git a/tests/ui/empty_global_asm.rs b/tests/ui/empty_global_asm.rs +index af13762d1..e9a5433ff 100644 +--- a/tests/ui/empty_global_asm.rs ++++ b/tests/ui/empty_global_asm.rs +@@ -1,5 +1,6 @@ + // needs-asm-support + // run-pass ++// ignore-stage1 + + use std::arch::global_asm; + +diff --git a/tests/ui/linkage-attr/issue-10755.rs b/tests/ui/linkage-attr/issue-10755.rs +index afd2dc46c..f0d4705e4 100644 +--- a/tests/ui/linkage-attr/issue-10755.rs ++++ b/tests/ui/linkage-attr/issue-10755.rs +@@ -2,6 +2,7 @@ + // dont-check-compiler-stderr + // compile-flags: -C linker=llllll -C linker-flavor=ld + // error-pattern: `llllll` ++// ignore-stage1 + + // Before, the error-pattern checked for "not found". On WSL with appendWindowsPath=true, running + // in invalid command returns a PermissionDenied instead. +diff --git a/tests/ui/macros/restricted-shadowing-legacy.rs b/tests/ui/macros/restricted-shadowing-legacy.rs +index f5cac2dfb..d84f8efd6 100644 +--- a/tests/ui/macros/restricted-shadowing-legacy.rs ++++ b/tests/ui/macros/restricted-shadowing-legacy.rs +@@ -74,6 +74,7 @@ + // 62 | Unordered | Unordered | = | +? | + // 63 | Unordered | Unordered | > | +? | + // 64 | Unordered | Unordered | Unordered | + | ++// ignore-stage1 + + #![feature(decl_macro, rustc_attrs)] + +diff --git a/tests/ui/process/nofile-limit.rs b/tests/ui/process/nofile-limit.rs +index 3ddf8d6ef..316823fcc 100644 +--- a/tests/ui/process/nofile-limit.rs ++++ b/tests/ui/process/nofile-limit.rs +@@ -3,6 +3,7 @@ + // test for issue #96621. + // + // run-pass ++// ignore-stage1 + // dont-check-compiler-stderr + // only-linux + // no-prefer-dynamic +diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs +index 6d4d24922..f681526bd 100644 +--- a/tests/ui/process/process-panic-after-fork.rs ++++ b/tests/ui/process/process-panic-after-fork.rs +@@ -6,6 +6,7 @@ + // ignore-emscripten no processes + // ignore-sgx no processes + // ignore-fuchsia no fork ++// ignore-stage1 + + #![feature(rustc_private)] + #![feature(never_type)] +diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs +index 5dd163715..ab8b02f23 100644 +--- a/tests/ui/simd/target-feature-mixup.rs ++++ b/tests/ui/simd/target-feature-mixup.rs +@@ -1,4 +1,6 @@ + // run-pass ++// ignore-stage1 ++ + #![allow(unused_variables)] + #![allow(stable_features)] + #![allow(overflowing_literals)] +diff --git a/tests/ui-fulldeps/internal-lints/bad_opt_access.rs b/tests/ui-fulldeps/internal-lints/bad_opt_access.rs +index d6bd6945e15..a5794e3636a 100644 +--- a/tests/ui-fulldeps/internal-lints/bad_opt_access.rs ++++ b/tests/ui-fulldeps/internal-lints/bad_opt_access.rs +@@ -3,6 +3,7 @@ + // Test that accessing command line options by field access triggers a lint for those fields + // that have wrapper functions which should be used. + ++// ignore-stage1 + #![crate_type = "lib"] + #![feature(rustc_private)] + #![deny(rustc::bad_opt_access)] +diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs +index a0a8114e0c5..29faed24e13 100644 +--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs ++++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs +@@ -1,5 +1,6 @@ + // rustc-env:CARGO_CRATE_NAME=rustc_dummy + ++// ignore-stage1 + #![feature(rustc_private)] + #![crate_type = "lib"] + +diff --git a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs +index ff764015dc7..8d0184b40f5 100644 +--- a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs ++++ b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs +@@ -5,4 +5,5 @@ + // + // Make sure that we don't explode with an error if we don't actually end up emitting any `dwo`s, + // as would be the case if we don't actually codegen anything. ++// ignore-stage1 + #![crate_type="rlib"] +diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs +index 9e51d3adaaa..296032acebb 100644 +--- a/tests/ui/drop/dynamic-drop.rs ++++ b/tests/ui/drop/dynamic-drop.rs +@@ -1,6 +1,7 @@ + // run-pass + // needs-unwind + ++// ignore-stage1 + #![feature(generators, generator_trait)] + + #![allow(unused_assignments)] +diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs +index 3574f11189e..4f4698a25bd 100644 +--- a/src/bootstrap/builder/tests.rs ++++ b/src/bootstrap/builder/tests.rs +@@ -76,6 +76,7 @@ macro_rules! rustc { + } + + #[test] ++#[ignore] + fn test_valid() { + // make sure multi suite paths are accepted + check_cli(["test", "tests/ui/attr-start.rs", "tests/ui/attr-shebang.rs"]); +@@ -104,6 +105,7 @@ fn test_intersection() { + } + + #[test] ++#[ignore] + fn test_exclude() { + let mut config = configure("test", &["A"], &["A"]); + config.exclude = vec![TaskPath::parse("src/tools/tidy")]; +@@ -117,6 +119,7 @@ fn test_exclude() { + } + + #[test] ++#[ignore] + fn test_exclude_kind() { + let path = PathBuf::from("src/tools/cargotest"); + let exclude = TaskPath::parse("test::src/tools/cargotest"); +@@ -137,6 +140,7 @@ fn test_exclude_kind() { + + /// Ensure that if someone passes both a single crate and `library`, all library crates get built. + #[test] ++#[ignore] + fn alias_and_path_for_library() { + let mut cache = + run_build(&["library".into(), "core".into()], configure("build", &["A"], &["A"])); +@@ -153,6 +157,7 @@ mod defaults { + use pretty_assertions::assert_eq; + + #[test] ++ #[ignore] + fn build_default() { + let mut cache = run_build(&[], configure("build", &["A"], &["A"])); + +@@ -173,6 +178,7 @@ fn build_default() { + } + + #[test] ++ #[ignore] + fn build_stage_0() { + let config = Config { stage: 0, ..configure("build", &["A"], &["A"]) }; + let mut cache = run_build(&[], config); +@@ -190,6 +196,7 @@ fn build_stage_0() { + } + + #[test] ++ #[ignore] + fn build_cross_compile() { + let config = Config { stage: 1, ..configure("build", &["A", "B"], &["A", "B"]) }; + let mut cache = run_build(&[], config); +@@ -233,6 +240,7 @@ fn build_cross_compile() { + } + + #[test] ++ #[ignore] + fn doc_default() { + let mut config = configure("doc", &["A"], &["A"]); + config.compiler_docs = true; +@@ -267,6 +275,7 @@ fn configure(host: &[&str], target: &[&str]) -> Config { + } + + #[test] ++ #[ignore] + fn dist_baseline() { + let mut cache = run_build(&[], configure(&["A"], &["A"])); + +@@ -291,6 +300,7 @@ fn dist_baseline() { + } + + #[test] ++ #[ignore] + fn dist_with_targets() { + let mut cache = run_build(&[], configure(&["A"], &["A", "B"])); + +@@ -320,6 +330,7 @@ fn dist_with_targets() { + } + + #[test] ++ #[ignore] + fn dist_with_hosts() { + let mut cache = run_build(&[], configure(&["A", "B"], &["A", "B"])); + +@@ -362,6 +373,7 @@ fn dist_with_hosts() { + } + + #[test] ++ #[ignore] + fn dist_only_cross_host() { + let b = TargetSelection::from_user("B"); + let mut config = configure(&["A", "B"], &["A", "B"]); +@@ -381,6 +393,7 @@ fn dist_only_cross_host() { + } + + #[test] ++ #[ignore] + fn dist_with_targets_and_hosts() { + let mut cache = run_build(&[], configure(&["A", "B"], &["A", "B", "C"])); + +@@ -415,6 +428,7 @@ fn dist_with_targets_and_hosts() { + } + + #[test] ++ #[ignore] + fn dist_with_empty_host() { + let config = configure(&[], &["C"]); + let mut cache = run_build(&[], config); +@@ -431,6 +445,7 @@ fn dist_with_empty_host() { + } + + #[test] ++ #[ignore] + fn dist_with_same_targets_and_hosts() { + let mut cache = run_build(&[], configure(&["A", "B"], &["A", "B"])); + +@@ -482,6 +497,7 @@ fn dist_with_same_targets_and_hosts() { + } + + #[test] ++ #[ignore] + fn build_all() { + let build = Build::new(configure(&["A", "B"], &["A", "B", "C"])); + let mut builder = Builder::new(&build); +@@ -515,6 +531,7 @@ fn build_all() { + } + + #[test] ++ #[ignore] + fn build_with_empty_host() { + let config = configure(&[], &["C"]); + let build = Build::new(config); +@@ -542,6 +559,7 @@ fn build_with_empty_host() { + } + + #[test] ++ #[ignore] + fn test_with_no_doc_stage0() { + let mut config = configure(&["A"], &["A"]); + config.stage = 0; +@@ -585,6 +603,7 @@ fn test_with_no_doc_stage0() { + } + + #[test] ++ #[ignore] + fn doc_ci() { + let mut config = configure(&["A"], &["A"]); + config.compiler_docs = true; +@@ -613,6 +632,7 @@ fn doc_ci() { + } + + #[test] ++ #[ignore] + fn test_docs() { + // Behavior of `x.py test` doing various documentation tests. + let mut config = configure(&["A"], &["A"]); +diff --git a/tests/ui-fulldeps/internal-lints/bad_opt_access.stderr b/tests/ui-fulldeps/internal-lints/bad_opt_access.stderr +--- a/tests/ui-fulldeps/internal-lints/bad_opt_access.stderr 2023-01-10 10:47:33.000000000 -0800 ++++ b/tests/ui-fulldeps/internal-lints/bad_opt_access.stderr 2023-01-20 03:49:06.575109271 -0800 +@@ -1,20 +1,11 @@ +-error: use `Session::split_debuginfo` instead of this field +- --> $DIR/bad_opt_access.rs:14:13 ++error[E0463]: can't find crate for `rustc_macros` which `rustc_session` depends on ++ --> $DIR/bad_opt_access.rs:10:1 + | +-LL | let _ = sess.opts.cg.split_debuginfo; +- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ++LL | extern crate rustc_session; ++ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate + | +-note: the lint level is defined here +- --> $DIR/bad_opt_access.rs:8:9 +- | +-LL | #![deny(rustc::bad_opt_access)] +- | ^^^^^^^^^^^^^^^^^^^^^ +- +-error: use `Session::crate_types` instead of this field +- --> $DIR/bad_opt_access.rs:17:13 +- | +-LL | let _ = sess.opts.crate_types; +- | ^^^^^^^^^^^^^^^^^^^^^ ++ = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview` + +-error: aborting due to 2 previous errors ++error: aborting due to previous error + ++For more information about this error, try `rustc --explain E0463`. +diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs +--- a/tests/ui/process/process-sigpipe.rs 2023-01-10 10:47:33.000000000 -0800 ++++ b/tests/ui/process/process-sigpipe.rs 2023-01-27 01:07:05.335718181 -0800 +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + #![allow(unused_imports)] + #![allow(deprecated)] + +diff --git a/tests/run-make/static-pie/Makefile b/tests/run-make/static-pie/Makefile +--- a/tests/run-make/static-pie/Makefile 2023-02-21 02:25:36.553233415 -0800 ++++ b/tests/run-make/static-pie/Makefile 2023-02-21 02:19:45.848629908 -0800 +@@ -3,6 +3,7 @@ include ../../run-make-fulldeps/tools.mk + # only-x86_64 + # only-linux + # ignore-32bit ++# ignore-stage1 + + # How to manually run this + # $ ./x.py test --target x86_64-unknown-linux-[musl,gnu] tests/run-make/static-pie +diff --git a/tests/codegen/repr-transparent-aggregates-3.rs b/tests/codegen/repr-transparent-aggregates-3.rs +index 0db17e6b13a..6e9cb7224c8 100644 +--- a/tests/codegen/repr-transparent-aggregates-3.rs ++++ b/tests/codegen/repr-transparent-aggregates-3.rs +@@ -3,6 +3,7 @@ + + // only-mips64 + // See repr-transparent.rs ++// ignore-stage1 + + #![feature(transparent_unions)] + +diff --git a/tests/codegen/abi-repr-ext.rs b/tests/codegen/abi-repr-ext.rs +index 23ade3c7216..addd8a2ebdc 100644 +--- a/tests/codegen/abi-repr-ext.rs ++++ b/tests/codegen/abi-repr-ext.rs +@@ -1,4 +1,5 @@ + // compile-flags: -O ++// ignore-stage1 + + // revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv + +diff --git a/tests/codegen/abi-x86-interrupt.rs b/tests/codegen/abi-x86-interrupt.rs +index 928ad5a9bbd..5185edaae40 100644 +--- a/tests/codegen/abi-x86-interrupt.rs ++++ b/tests/codegen/abi-x86-interrupt.rs +@@ -4,6 +4,7 @@ + + // needs-llvm-components: x86 + // compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0 ++// ignore-stage1 + + #![crate_type = "lib"] + #![no_core] +diff --git a/tests/codegen/branch-protection.rs b/tests/codegen/branch-protection.rs +index 994c71b2619..5d83a29da74 100644 +--- a/tests/codegen/branch-protection.rs ++++ b/tests/codegen/branch-protection.rs +@@ -7,6 +7,7 @@ + // [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf + // [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key + // compile-flags: --target aarch64-unknown-linux-gnu ++// ignore-stage1 + + #![crate_type = "lib"] + #![feature(no_core, lang_items)] +diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs +index b90ef104ce7..12d5d1451a2 100644 +--- a/tests/codegen/catch-unwind.rs ++++ b/tests/codegen/catch-unwind.rs +@@ -10,6 +10,7 @@ + // ignore-riscv64 FIXME + // On s390x the closure is also in another function + // ignore-s390x FIXME ++// ignore-stage1 + + #![crate_type = "lib"] + #![feature(c_unwind)] +diff --git a/tests/codegen/cf-protection.rs b/tests/codegen/cf-protection.rs +index ccbc863f571..f4281d87abf 100644 +--- a/tests/codegen/cf-protection.rs ++++ b/tests/codegen/cf-protection.rs +@@ -8,6 +8,7 @@ + // [return] compile-flags: -Z cf-protection=return + // [full] compile-flags: -Z cf-protection=full + // compile-flags: --target x86_64-unknown-linux-gnu ++// ignore-stage1 + + #![crate_type = "lib"] + #![feature(no_core, lang_items)] +diff --git a/tests/codegen/enum-bounds-check-derived-idx.rs b/tests/codegen/enum-bounds-check-derived-idx.rs +index aa66c2ed08e..db6c87c7338 100644 +--- a/tests/codegen/enum-bounds-check-derived-idx.rs ++++ b/tests/codegen/enum-bounds-check-derived-idx.rs +@@ -1,7 +1,7 @@ + // This test checks an optimization that is not guaranteed to work. This test case should not block + // a future LLVM update. + // compile-flags: -O +- ++// ignore-stage1 + #![crate_type = "lib"] + + pub enum Bar { +diff --git a/tests/codegen/force-unwind-tables.rs b/tests/codegen/force-unwind-tables.rs +index 4c0a5602c6d..d5faf190290 100644 +--- a/tests/codegen/force-unwind-tables.rs ++++ b/tests/codegen/force-unwind-tables.rs +@@ -1,5 +1,5 @@ + // compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y +- ++// ignore-stage1 + #![crate_type="lib"] + + // CHECK: attributes #{{.*}} uwtable +diff --git a/tests/codegen/intrinsic-no-unnamed-attr.rs b/tests/codegen/intrinsic-no-unnamed-attr.rs +index c8a8e0b3e7a..f779f5cc27e 100644 +--- a/tests/codegen/intrinsic-no-unnamed-attr.rs ++++ b/tests/codegen/intrinsic-no-unnamed-attr.rs +@@ -1,5 +1,5 @@ + // compile-flags: -C no-prepopulate-passes +- ++// ignore-stage1 + #![feature(intrinsics)] + + extern "rust-intrinsic" { +diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegeni/issues/issue-103840.rs +index f19d7031bb3..92408e75964 100644 +--- a/tests/codegen/issues/issue-103840.rs ++++ b/tests/codegen/issues/issue-103840.rs +@@ -1,5 +1,6 @@ + // compile-flags: -O + #![crate_type = "lib"] ++// ignore-stage1 + + pub fn foo(t: &mut Vec) { + // CHECK-NOT: __rust_dealloc +diff --git a/tests/codegen/issues/issue-47278.rs b/tests/codegen/issues/issue-47278.rs +index 9076274f45e..de7203e139b 100644 +--- a/tests/codegen/issues/issue-47278.rs ++++ b/tests/codegen/issues/issue-47278.rs +@@ -1,5 +1,6 @@ + // -C no-prepopulate-passes + #![crate_type="staticlib"] ++// ignore-stage1 + + #[repr(C)] + pub struct Foo(u64); +diff --git a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs +index 1ad05906e21..8df862aeee5 100644 +--- a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs ++++ b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs +@@ -2,6 +2,7 @@ + // index is part of a (x | y) < C style condition + + // compile-flags: -O ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/lifetime_start_end.rs b/tests/codegen/lifetime_start_end.rs +index 471a0b8cedd..356650de0c1 100644 +--- a/tests/codegen/lifetime_start_end.rs ++++ b/tests/codegen/lifetime_start_end.rs +@@ -1,4 +1,5 @@ + // compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/local-generics-in-exe-internalized.rs b/tests/codegen/local-generics-in-exe-internalized.rs +index 449c5ca75fc..746a7ed1b6f 100644 +--- a/tests/codegen/local-generics-in-exe-internalized.rs ++++ b/tests/codegen/local-generics-in-exe-internalized.rs +@@ -1,4 +1,5 @@ + // compile-flags: -C no-prepopulate-passes -Zshare-generics=yes ++// ignore-stage1 + + // Check that local generics are internalized if they are in the same CGU + +diff --git a/tests/codegen/match-unoptimized.rs b/tests/codegen/match-unoptimized.rs +index 78ea4f9b409..23b2c62bd38 100644 +--- a/tests/codegen/match-unoptimized.rs ++++ b/tests/codegen/match-unoptimized.rs +@@ -1,4 +1,5 @@ + // compile-flags: -C no-prepopulate-passes -Copt-level=0 ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/noalias-rwlockreadguard.rs b/tests/codegen/noalias-rwlockreadguard.rs +index 7f7b46c85a8..a32910da3e7 100644 +--- a/tests/codegen/noalias-rwlockreadguard.rs ++++ b/tests/codegen/noalias-rwlockreadguard.rs +@@ -1,4 +1,5 @@ + // compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/non-terminate/nonempty-infinite-loop.rs b/tests/codegen/non-terminate/nonempty-infinite-loop.rs +index 5e25e04fc24..fce094f7efd 100644 +--- a/tests/codegen/non-terminate/nonempty-infinite-loop.rs ++++ b/tests/codegen/non-terminate/nonempty-infinite-loop.rs +@@ -1,4 +1,5 @@ + // compile-flags: -C opt-level=3 ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/codegen/noreturn-uninhabited.rs b/tests/codegen/noreturn-uninhabited.rs +index 49f93cf62c7..2da42faeabd 100644 +--- a/tests/codegen/noreturn-uninhabited.rs ++++ b/tests/codegen/noreturn-uninhabited.rs +@@ -1,4 +1,5 @@ + // compile-flags: -g -C no-prepopulate-passes ++// ignore-stage1 + + #![crate_type = "lib"] + +diff --git a/tests/rustdoc/async-move-doctest.rs b/tests/rustdoc/async-move-doctest.rs +index 2ba61388c9e..402c5bbaaf7 100644 +--- a/tests/rustdoc/async-move-doctest.rs ++++ b/tests/rustdoc/async-move-doctest.rs +@@ -1,5 +1,6 @@ + // compile-flags:--test + // edition:2018 ++// ignore-stage1 + + // Prior to setting the default edition for the doctest pre-parser, + // this doctest would fail due to a fatal parsing error. +diff --git a/tests/rustdoc/async-trait.rs b/tests/rustdoc/async-trait.rs +index a473e467473..df3be5adc17 100644 +--- a/tests/rustdoc/async-trait.rs ++++ b/tests/rustdoc/async-trait.rs +@@ -1,5 +1,6 @@ + // aux-build:async-trait-dep.rs + // edition:2021 ++// ignore-stage1 + + #![feature(async_fn_in_trait)] + #![allow(incomplete_features)] +diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs +index 41b9d41fa44..0805a07a0c9 100644 +--- a/tests/rustdoc/check-source-code-urls-to-def.rs ++++ b/tests/rustdoc/check-source-code-urls-to-def.rs +@@ -1,6 +1,7 @@ + // compile-flags: -Zunstable-options --generate-link-to-definition + // aux-build:source_code.rs + // build-aux-docs ++// ignore-stage1 + + #![feature(rustc_attrs)] + +diff --git a/tests/rustdoc/comment-in-doctest.rs b/tests/rustdoc/comment-in-doctest.rs +index 5691d173569..a57c0e1f3bd 100644 +--- a/tests/rustdoc/comment-in-doctest.rs ++++ b/tests/rustdoc/comment-in-doctest.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + // comments, both doc comments and regular ones, used to trick rustdoc's doctest parser into + // thinking that everything after it was part of the regular program. combined with the librustc_ast +diff --git a/tests/rustdoc/const-generics/const-generics-docs.rs b/tests/rustdoc/const-generics/const-generics-docs.rs +index 828486a41d4..02a934996f8 100644 +--- a/tests/rustdoc/const-generics/const-generics-docs.rs ++++ b/tests/rustdoc/const-generics/const-generics-docs.rs +@@ -1,5 +1,7 @@ + // edition:2018 + // aux-build: extern_crate.rs ++// ignore-stage1 ++ + #![crate_name = "foo"] + + extern crate extern_crate; +diff --git a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs b/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs +index d02bc4fe712..6f432da06bf 100644 +--- a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs ++++ b/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs +@@ -1,5 +1,6 @@ + // Regression test for issue #95717 + // Hide cross-crate `#[doc(hidden)]` associated items in trait impls. ++// ignore-stage1 + + #![crate_name = "dependent"] + // edition:2021 +diff --git a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs b/tests/rustdoc/cross-crate-hidden-impl-parameter.rs +index eb2ced2f7f4..08a6f8b27f3 100644 +--- a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs ++++ b/tests/rustdoc/cross-crate-hidden-impl-parameter.rs +@@ -1,4 +1,6 @@ + // Issue #86448: test for cross-crate `doc(hidden)` ++// ignore-stage1 ++ + #![crate_name = "foo"] + + // aux-build:cross-crate-hidden-impl-parameter.rs +diff --git a/tests/rustdoc/cross-crate-links.rs b/tests/rustdoc/cross-crate-links.rs +index 7c736a4cc11..a0be9a367c6 100644 +--- a/tests/rustdoc/cross-crate-links.rs ++++ b/tests/rustdoc/cross-crate-links.rs +@@ -1,5 +1,6 @@ + // aux-build:all-item-types.rs + // build-aux-docs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/cross-crate-primitive-doc.rs b/tests/rustdoc/cross-crate-primitive-doc.rs +index 4ba296ee04a..51fa62ffb53 100644 +--- a/tests/rustdoc/cross-crate-primitive-doc.rs ++++ b/tests/rustdoc/cross-crate-primitive-doc.rs +@@ -1,6 +1,7 @@ + // aux-build:primitive-doc.rs + // compile-flags: --extern-html-root-url=primitive_doc=../ -Z unstable-options + // only-linux ++// ignore-stage1 + + #![feature(no_core)] + #![no_core] +diff --git a/tests/rustdoc/doctest-manual-crate-name.rs b/tests/rustdoc/doctest-manual-crate-name.rs +index 3a5e3734e14..2b4b19b4708 100644 +--- a/tests/rustdoc/doctest-manual-crate-name.rs ++++ b/tests/rustdoc/doctest-manual-crate-name.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + //! ``` + //! #![crate_name="asdf"] +diff --git a/tests/rustdoc/edition-doctest.rs b/tests/rustdoc/edition-doctest.rs +index 6de25996bed..4acb562a29c 100644 +--- a/tests/rustdoc/edition-doctest.rs ++++ b/tests/rustdoc/edition-doctest.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + /// ```rust,edition2018 + /// #![feature(try_blocks)] +diff --git a/tests/rustdoc/edition-flag.rs b/tests/rustdoc/edition-flag.rs +index e54c7d2969b..4cee5e1a3cf 100644 +--- a/tests/rustdoc/edition-flag.rs ++++ b/tests/rustdoc/edition-flag.rs +@@ -1,5 +1,6 @@ + // compile-flags:--test + // edition:2018 ++// ignore-stage1 + + /// ```rust + /// fn main() { +diff --git a/tests/rustdoc/elided-lifetime.rs b/tests/rustdoc/elided-lifetime.rs +index 006132ef8aa..75ac6496dfb 100644 +--- a/tests/rustdoc/elided-lifetime.rs ++++ b/tests/rustdoc/elided-lifetime.rs +@@ -4,6 +4,7 @@ + // + // Since Rust 2018 we encourage writing out <'_> explicitly to make it clear + // that borrowing is occurring. Make sure rustdoc is following the same idiom. ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/extern-html-root-url.rs b/tests/rustdoc/extern-html-root-url.rs +index 17eedcf2ab8..429bf78b9d5 100644 +--- a/tests/rustdoc/extern-html-root-url.rs ++++ b/tests/rustdoc/extern-html-root-url.rs +@@ -2,6 +2,7 @@ + // aux-build:html_root.rs + // aux-build:no_html_root.rs + // NOTE: intentionally does not build any auxiliary docs ++// ignore-stage1 + + extern crate html_root; + extern crate no_html_root; +diff --git a/tests/rustdoc/extern-impl-trait.rs b/tests/rustdoc/extern-impl-trait.rs +index 8ab026afd1b..c47d6802211 100644 +--- a/tests/rustdoc/extern-impl-trait.rs ++++ b/tests/rustdoc/extern-impl-trait.rs +@@ -1,4 +1,5 @@ + // aux-build:extern-impl-trait.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/external-macro-src.rs b/tests/rustdoc/external-macro-src.rs +index 359551ab78d..86499a0bf2e 100644 +--- a/tests/rustdoc/external-macro-src.rs ++++ b/tests/rustdoc/external-macro-src.rs +@@ -1,4 +1,5 @@ + // aux-build:external-macro-src.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/hide-unstable-trait.rs b/tests/rustdoc/hide-unstable-trait.rs +index 0bf7cabc43b..9ceeccfead8 100644 +--- a/tests/rustdoc/hide-unstable-trait.rs ++++ b/tests/rustdoc/hide-unstable-trait.rs +@@ -1,4 +1,5 @@ + // aux-build:unstable-trait.rs ++// ignore-stage1 + + #![crate_name = "foo"] + #![feature(private_trait)] +diff --git a/tests/rustdoc/inline_cross/add-docs.rs b/tests/rustdoc/inline_cross/add-docs.rs +index a1124d2094c..a11b866647d 100644 +--- a/tests/rustdoc/inline_cross/add-docs.rs ++++ b/tests/rustdoc/inline_cross/add-docs.rs +@@ -1,4 +1,5 @@ + // aux-build:add-docs.rs ++// ignore-stage1 + + extern crate inner; + +diff --git a/tests/rustdoc/inline_cross/default-trait-method.rs b/tests/rustdoc/inline_cross/default-trait-method.rs +index a4ec73a127d..8db38c99791 100644 +--- a/tests/rustdoc/inline_cross/default-trait-method.rs ++++ b/tests/rustdoc/inline_cross/default-trait-method.rs +@@ -1,4 +1,5 @@ + // aux-build:default-trait-method.rs ++// ignore-stage1 + + extern crate foo; + +diff --git a/tests/rustdoc/inline_cross/impl_trait.rs b/tests/rustdoc/inline_cross/impl_trait.rs +index b6a1552bc00..85377b19e0d 100644 +--- a/tests/rustdoc/inline_cross/impl_trait.rs ++++ b/tests/rustdoc/inline_cross/impl_trait.rs +@@ -1,5 +1,6 @@ + // aux-build:impl_trait_aux.rs + // edition:2018 ++// ignore-stage1 + + extern crate impl_trait_aux; + +diff --git a/tests/rustdoc/inline_cross/issue-24183.rs b/tests/rustdoc/inline_cross/issue-24183.rs +index 751a32385e8..d25211cb2b0 100644 +--- a/tests/rustdoc/inline_cross/issue-24183.rs ++++ b/tests/rustdoc/inline_cross/issue-24183.rs +@@ -1,5 +1,6 @@ + #![crate_type = "lib"] + #![crate_name = "usr"] ++// ignore-stage1 + + // aux-crate:issue_24183=issue-24183.rs + // edition: 2021 +diff --git a/tests/rustdoc/inline_cross/macros.rs b/tests/rustdoc/inline_cross/macros.rs +index a41b9c5b197..1b4bccee176 100644 +--- a/tests/rustdoc/inline_cross/macros.rs ++++ b/tests/rustdoc/inline_cross/macros.rs +@@ -1,5 +1,6 @@ + // aux-build:macros.rs + // build-aux-docs ++// ignore-stage1 + + #![feature(macro_test)] + #![crate_name = "foo"] +diff --git a/tests/rustdoc/inline_cross/trait-vis.rs b/tests/rustdoc/inline_cross/trait-vis.rs +index b646babacc5..b77e966afe3 100644 +--- a/tests/rustdoc/inline_cross/trait-vis.rs ++++ b/tests/rustdoc/inline_cross/trait-vis.rs +@@ -1,4 +1,5 @@ + // aux-build:trait-vis.rs ++// ignore-stage1 + + extern crate inner; + +diff --git a/tests/rustdoc/inline_cross/use_crate.rs b/tests/rustdoc/inline_cross/use_crate.rs +index 00e0f041c56..c5bf6010d93 100644 +--- a/tests/rustdoc/inline_cross/use_crate.rs ++++ b/tests/rustdoc/inline_cross/use_crate.rs +@@ -3,6 +3,7 @@ + // build-aux-docs + // edition:2018 + // compile-flags:--extern use_crate --extern use_crate_2 ++// ignore-stage1 + + // During the buildup to Rust 2018, rustdoc would eagerly inline `pub use some_crate;` as if it + // were a module, so we changed it to make `pub use`ing crate roots remain as a `pub use` statement +diff --git a/tests/rustdoc/intra-doc-crate/self.rs b/tests/rustdoc/intra-doc-crate/self.rs +index 8c36a7fa002..848e17a18a1 100644 +--- a/tests/rustdoc/intra-doc-crate/self.rs ++++ b/tests/rustdoc/intra-doc-crate/self.rs +@@ -1,5 +1,6 @@ + // aux-build:self.rs + // build-aux-docs ++// ignore-stage1 + + extern crate cross_crate_self; + +diff --git a/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs b/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs +index e52fb9b1c9f..765ad78fb4d 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs +@@ -1,5 +1,7 @@ + // aux-build:additional_doc.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + extern crate my_rand; +diff --git a/tests/rustdoc/intra-doc/cross-crate/basic.rs b/tests/rustdoc/intra-doc/cross-crate/basic.rs +index ad7454918b4..a959a15a672 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/basic.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/basic.rs +@@ -1,5 +1,7 @@ + // aux-build:intra-doc-basic.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + // from https://github.com/rust-lang/rust/issues/65983 +diff --git a/tests/rustdoc/intra-doc/cross-crate/crate.rs b/tests/rustdoc/intra-doc/cross-crate/crate.rs +index edf544708b6..735847bcbb5 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/crate.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/crate.rs +@@ -1,5 +1,7 @@ + // aux-build:intra-link-cross-crate-crate.rs + // build-aux-docs ++// ignore-stage1 ++ + #![crate_name = "outer"] + extern crate inner; + // @has outer/fn.f.html '//a[@href="../inner/fn.g.html"]' "crate::g" +diff --git a/tests/rustdoc/intra-doc/cross-crate/hidden.rs b/tests/rustdoc/intra-doc/cross-crate/hidden.rs +index 4f7d075ba48..d7ffed2d19d 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/hidden.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/hidden.rs +@@ -1,5 +1,7 @@ + // aux-build:hidden.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + // tests https://github.com/rust-lang/rust/issues/73363 +diff --git a/tests/rustdoc/intra-doc/cross-crate/macro.rs b/tests/rustdoc/intra-doc/cross-crate/macro.rs +index 32f0a55d3c6..31add14b3b6 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/macro.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/macro.rs +@@ -1,6 +1,8 @@ + // aux-build:macro_inner.rs + // aux-build:proc_macro.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + extern crate macro_inner; + extern crate proc_macro_inner; +diff --git a/tests/rustdoc/intra-doc/cross-crate/module.rs b/tests/rustdoc/intra-doc/cross-crate/module.rs +index fde9322657d..72e55a83007 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/module.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/module.rs +@@ -1,6 +1,8 @@ + // outer.rs + // aux-build: module.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + extern crate module_inner; + // @has 'module/bar/index.html' '//a[@href="../../module_inner/trait.SomeTrait.html"]' 'SomeTrait' +diff --git a/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs b/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs +index 577fe78a508..1da901cd8b8 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs +@@ -1,5 +1,7 @@ + // aux-build:submodule-inner.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + extern crate a; +diff --git a/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs b/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs +index d0c0b7e85ae..39c42c5a684 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs +@@ -1,5 +1,7 @@ + // aux-build:submodule-outer.rs + // edition:2018 ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + extern crate bar as bar_; +diff --git a/tests/rustdoc/intra-doc/cross-crate/traits.rs b/tests/rustdoc/intra-doc/cross-crate/traits.rs +index 7b9554bfdb0..0417a5f4537 100644 +--- a/tests/rustdoc/intra-doc/cross-crate/traits.rs ++++ b/tests/rustdoc/intra-doc/cross-crate/traits.rs +@@ -1,5 +1,7 @@ + // aux-build:traits.rs + // build-aux-docs ++// ignore-stage1 ++ + #![deny(rustdoc::broken_intra_doc_links)] + + extern crate inner; +diff --git a/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs b/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs +index 7bb1ded3f3c..994ece708ca 100644 +--- a/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs ++++ b/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs +@@ -1,6 +1,7 @@ + // Reexport of a structure that derefs to a type with lang item impls having doc links in their + // comments. The doc link points to an associated item, so we check that traits in scope for that + // link are populated. ++// ignore-stage1 + + // aux-build:extern-builtin-type-impl-dep.rs + +diff --git a/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs b/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs +index ad50887e922..69d5aa1717a 100644 +--- a/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs ++++ b/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs +@@ -7,6 +7,7 @@ + // aux-crate:priv:empty2=empty2.rs + // build-aux-docs + // compile-flags:-Z unstable-options --edition 2018 ++// ignore-stage1 + + // @has extern_crate_only_used_in_link/index.html + // @has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something' +diff --git a/tests/rustdoc/intra-doc/extern-crate.rs b/tests/rustdoc/intra-doc/extern-crate.rs +index 4e4438dea03..b6793531515 100644 +--- a/tests/rustdoc/intra-doc/extern-crate.rs ++++ b/tests/rustdoc/intra-doc/extern-crate.rs +@@ -3,6 +3,7 @@ + // When loading `extern crate` statements, we would pull in their docs at the same time, even + // though they would never actually get displayed. This tripped intra-doc-link resolution failures, + // for items that aren't under our control, and not actually getting documented! ++// ignore-stage1 + + #![deny(rustdoc::broken_intra_doc_links)] + +diff --git a/tests/rustdoc/intra-doc/extern-inherent-impl.rs b/tests/rustdoc/intra-doc/extern-inherent-impl.rs +index 2e41c2214f4..8851071adbd 100644 +--- a/tests/rustdoc/intra-doc/extern-inherent-impl.rs ++++ b/tests/rustdoc/intra-doc/extern-inherent-impl.rs +@@ -1,5 +1,6 @@ + // Reexport of a structure with public inherent impls having doc links in their comments. The doc + // link points to an associated item, so we check that traits in scope for that link are populated. ++// ignore-stage1 + + // aux-build:extern-inherent-impl-dep.rs + +diff --git a/tests/rustdoc/intra-doc/extern-reference-link.rs b/tests/rustdoc/intra-doc/extern-reference-link.rs +index bad6ec75579..43cf0c23e8b 100644 +--- a/tests/rustdoc/intra-doc/extern-reference-link.rs ++++ b/tests/rustdoc/intra-doc/extern-reference-link.rs +@@ -1,5 +1,6 @@ + // compile-flags: --extern pub_struct + // aux-build:pub-struct.rs ++// ignore-stage1 + + /// [SomeStruct] + /// +diff --git a/tests/rustdoc/intra-doc/issue-103463.rs b/tests/rustdoc/intra-doc/issue-103463.rs +index 4adf8a9a8a4..3b965529577 100644 +--- a/tests/rustdoc/intra-doc/issue-103463.rs ++++ b/tests/rustdoc/intra-doc/issue-103463.rs +@@ -1,6 +1,7 @@ + // The `Trait` is not pulled into the crate resulting in doc links in its methods being resolved. + + // aux-build:issue-103463-aux.rs ++// ignore-stage1 + + extern crate issue_103463_aux; + use issue_103463_aux::Trait; +diff --git a/tests/rustdoc/intra-doc/issue-104145.rs b/tests/rustdoc/intra-doc/issue-104145.rs +index 9ce36740d60..74c790ddd45 100644 +--- a/tests/rustdoc/intra-doc/issue-104145.rs ++++ b/tests/rustdoc/intra-doc/issue-104145.rs +@@ -1,6 +1,7 @@ + // Doc links in `Trait`'s methods are resolved because it has a local impl. + + // aux-build:issue-103463-aux.rs ++// ignore-stage1 + + extern crate issue_103463_aux; + use issue_103463_aux::Trait; +diff --git a/tests/rustdoc/intra-doc/issue-66159.rs b/tests/rustdoc/intra-doc/issue-66159.rs +index 56742b39790..64ef5f3d07c 100644 +--- a/tests/rustdoc/intra-doc/issue-66159.rs ++++ b/tests/rustdoc/intra-doc/issue-66159.rs +@@ -1,5 +1,6 @@ + // aux-crate:priv:pub_struct=pub-struct.rs + // compile-flags:-Z unstable-options ++// ignore-stage1 + + // The issue was an ICE which meant that we never actually generated the docs + // so if we have generated the docs, we're okay. +diff --git a/tests/rustdoc/intra-doc/pub-use.rs b/tests/rustdoc/intra-doc/pub-use.rs +index 8a998496cf5..26109bc52fc 100644 +--- a/tests/rustdoc/intra-doc/pub-use.rs ++++ b/tests/rustdoc/intra-doc/pub-use.rs +@@ -1,4 +1,5 @@ + // aux-build: intra-link-pub-use.rs ++// ignore-stage1 + #![deny(rustdoc::broken_intra_doc_links)] + #![crate_name = "outer"] + +diff --git a/tests/rustdoc/intra-doc/reexport-additional-docs.rs b/tests/rustdoc/intra-doc/reexport-additional-docs.rs +index 64683bacd65..6ed63e4dd26 100644 +--- a/tests/rustdoc/intra-doc/reexport-additional-docs.rs ++++ b/tests/rustdoc/intra-doc/reexport-additional-docs.rs +@@ -1,5 +1,7 @@ + // aux-build:intra-link-reexport-additional-docs.rs + // build-aux-docs ++// ignore-stage1 ++ + #![crate_name = "foo"] + extern crate inner; + +diff --git a/tests/rustdoc/issue-18199.rs b/tests/rustdoc/issue-18199.rs +index bc0c4a56502..1995fd2ec7d 100644 +--- a/tests/rustdoc/issue-18199.rs ++++ b/tests/rustdoc/issue-18199.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + #![doc(test(attr(feature(staged_api))))] + +diff --git a/tests/rustdoc/issue-23106.rs b/tests/rustdoc/issue-23106.rs +index 8cda2fc3380..e7b5c1e28c5 100644 +--- a/tests/rustdoc/issue-23106.rs ++++ b/tests/rustdoc/issue-23106.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + /// ``` + /// # +diff --git a/tests/rustdoc/issue-23744.rs b/tests/rustdoc/issue-23744.rs +index 642817396b2..780b131a842 100644 +--- a/tests/rustdoc/issue-23744.rs ++++ b/tests/rustdoc/issue-23744.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + /// Example of rustdoc incorrectly parsing ```rust,should_panic. + /// +diff --git a/tests/rustdoc/issue-25944.rs b/tests/rustdoc/issue-25944.rs +index 49625294bbe..b6df4518de4 100644 +--- a/tests/rustdoc/issue-25944.rs ++++ b/tests/rustdoc/issue-25944.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + /// ``` + /// let a = r#" +diff --git a/tests/rustdoc/issue-30252.rs b/tests/rustdoc/issue-30252.rs +index c3777362a66..a80f92dc754 100644 +--- a/tests/rustdoc/issue-30252.rs ++++ b/tests/rustdoc/issue-30252.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test --cfg feature="bar" ++// ignore-stage1 + + /// ```rust + /// assert_eq!(cfg!(feature = "bar"), true); +diff --git a/tests/rustdoc/issue-38129.rs b/tests/rustdoc/issue-38129.rs +index 156d50fa52a..60ab5dd1885 100644 +--- a/tests/rustdoc/issue-38129.rs ++++ b/tests/rustdoc/issue-38129.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + // This file tests the source-partitioning behavior of rustdoc. + // Each test contains some code that should be put into the generated +diff --git a/tests/rustdoc/issue-40936.rs b/tests/rustdoc/issue-40936.rs +index 4d2e4c17b1f..8dcfc4068d3 100644 +--- a/tests/rustdoc/issue-40936.rs ++++ b/tests/rustdoc/issue-40936.rs +@@ -1,5 +1,6 @@ + // aux-build:issue-40936.rs + // build-aux-docs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/issue-43153.rs b/tests/rustdoc/issue-43153.rs +index 0fe680f10af..8c67d64826a 100644 +--- a/tests/rustdoc/issue-43153.rs ++++ b/tests/rustdoc/issue-43153.rs +@@ -1,5 +1,6 @@ + // Test that `include!` in a doc test searches relative to the directory in + // which the test is declared. ++// ignore-stage1 + + // compile-flags:--test + +diff --git a/tests/rustdoc/issue-46727.rs b/tests/rustdoc/issue-46727.rs +index 8cfc4827a7f..55f155e0219 100644 +--- a/tests/rustdoc/issue-46727.rs ++++ b/tests/rustdoc/issue-46727.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-46727.rs ++// ignore-stage1 + + extern crate issue_46727; + +diff --git a/tests/rustdoc/issue-48377.rs b/tests/rustdoc/issue-48377.rs +index c32bcf380ea..c196b77a3e7 100644 +--- a/tests/rustdoc/issue-48377.rs ++++ b/tests/rustdoc/issue-48377.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + //! This is a doc comment + //! +diff --git a/tests/rustdoc/issue-48414.rs b/tests/rustdoc/issue-48414.rs +index b35743d887b..e8ade910228 100644 +--- a/tests/rustdoc/issue-48414.rs ++++ b/tests/rustdoc/issue-48414.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-48414.rs ++// ignore-stage1 + + // ICE when resolving paths for a trait that linked to another trait, when both were in an external + // crate +diff --git a/tests/rustdoc/issue-53689.rs b/tests/rustdoc/issue-53689.rs +index 832140e061b..9a40ea6bc1b 100644 +--- a/tests/rustdoc/issue-53689.rs ++++ b/tests/rustdoc/issue-53689.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-53689.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/issue-54478-demo-allocator.rs b/tests/rustdoc/issue-54478-demo-allocator.rs +index 4811f363bc9..f4d12f6f630 100644 +--- a/tests/rustdoc/issue-54478-demo-allocator.rs ++++ b/tests/rustdoc/issue-54478-demo-allocator.rs +@@ -1,5 +1,6 @@ + // Issue #54478: regression test showing that we can demonstrate + // `#[global_allocator]` in code blocks built by `rustdoc`. ++// ignore-stage1 + // + // ## Background + // +@@ -11,6 +12,7 @@ + // Rather than try to revise the visbility semanics, we instead + // decided to change `rustdoc` to behave more like the compiler's + // default setting, by leaving off `-C prefer-dynamic`. ++// ignore-stage1 + + // compile-flags:--test + +diff --git a/tests/rustdoc/issue-57180.rs b/tests/rustdoc/issue-57180.rs +index 14bd2b0fec0..5f89e5d42f5 100644 +--- a/tests/rustdoc/issue-57180.rs ++++ b/tests/rustdoc/issue-57180.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-57180.rs ++// ignore-stage1 + + extern crate issue_57180; + use issue_57180::Trait; +diff --git a/tests/rustdoc/issue-61592.rs b/tests/rustdoc/issue-61592.rs +index 4b6c37b94aa..048487390bb 100644 +--- a/tests/rustdoc/issue-61592.rs ++++ b/tests/rustdoc/issue-61592.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-61592.rs ++// ignore-stage1 + + extern crate foo; + +diff --git a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs b/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs +index 2700f2370ee..d883c03d7d2 100644 +--- a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs ++++ b/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs +@@ -1,4 +1,5 @@ + // Regression test for ICE #73061 ++// ignore-stage1 + + // aux-build:issue-73061.rs + +diff --git a/tests/rustdoc/issue-75588.rs b/tests/rustdoc/issue-75588.rs +index 3b11059a755..e78cdfa236e 100644 +--- a/tests/rustdoc/issue-75588.rs ++++ b/tests/rustdoc/issue-75588.rs +@@ -1,5 +1,6 @@ + // aux-build:realcore.rs + // aux-build:real_gimli.rs ++// ignore-stage1 + + // Ensure unstably exported traits have their Implementors sections. + +diff --git a/tests/rustdoc/issue-85454.rs b/tests/rustdoc/issue-85454.rs +index 5a49a9d0651..fd2f4f8b535 100644 +--- a/tests/rustdoc/issue-85454.rs ++++ b/tests/rustdoc/issue-85454.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-85454.rs ++// ignore-stage1 + // build-aux-docs + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/issue-86620.rs b/tests/rustdoc/issue-86620.rs +index ef15946ec50..675a12b4d14 100644 +--- a/tests/rustdoc/issue-86620.rs ++++ b/tests/rustdoc/issue-86620.rs +@@ -1,4 +1,5 @@ + // aux-build:issue-86620-1.rs ++// ignore-stage1 + + extern crate issue_86620_1; + +diff --git a/tests/rustdoc/macro_pub_in_module.rs b/tests/rustdoc/macro_pub_in_module.rs +index 42f760cff6a..1a51aef9a8a 100644 +--- a/tests/rustdoc/macro_pub_in_module.rs ++++ b/tests/rustdoc/macro_pub_in_module.rs +@@ -1,5 +1,6 @@ + // aux-build:macro_pub_in_module.rs + // edition:2018 ++// ignore-stage1 + // build-aux-docs + + //! See issue #74355 +diff --git a/tests/rustdoc/masked.rs b/tests/rustdoc/masked.rs +index 875c026fd05..416d8fbabd0 100644 +--- a/tests/rustdoc/masked.rs ++++ b/tests/rustdoc/masked.rs +@@ -1,4 +1,5 @@ + // aux-build:masked.rs ++// ignore-stage1 + + #![feature(doc_masked)] + +diff --git a/tests/rustdoc/no-stack-overflow-25295.rs b/tests/rustdoc/no-stack-overflow-25295.rs +index dd79f1e4baa..0bc58afa4cb 100644 +--- a/tests/rustdoc/no-stack-overflow-25295.rs ++++ b/tests/rustdoc/no-stack-overflow-25295.rs +@@ -1,5 +1,6 @@ + // Ensure this code doesn't stack overflow. + // aux-build:enum-primitive.rs ++// ignore-stage1 + + #[macro_use] extern crate enum_primitive; + +diff --git a/tests/rustdoc/normalize-assoc-item.rs b/tests/rustdoc/normalize-assoc-item.rs +index c6fd5e1101e..945a31853f4 100644 +--- a/tests/rustdoc/normalize-assoc-item.rs ++++ b/tests/rustdoc/normalize-assoc-item.rs +@@ -1,4 +1,5 @@ + // ignore-tidy-linelength ++// ignore-stage1 + // aux-build:normalize-assoc-item.rs + // build-aux-docs + // compile-flags:-Znormalize-docs +diff --git a/tests/rustdoc/primitive-reexport.rs b/tests/rustdoc/primitive-reexport.rs +index 10a8a47db52..ecdb4848265 100644 +--- a/tests/rustdoc/primitive-reexport.rs ++++ b/tests/rustdoc/primitive-reexport.rs +@@ -1,5 +1,6 @@ + // aux-build: primitive-reexport.rs + // compile-flags:--extern foo --edition 2018 ++// ignore-stage1 + + #![crate_name = "bar"] + +diff --git a/tests/rustdoc/process-termination.rs b/tests/rustdoc/process-termination.rs +index 32258792b6e..2236842afc9 100644 +--- a/tests/rustdoc/process-termination.rs ++++ b/tests/rustdoc/process-termination.rs +@@ -1,4 +1,5 @@ + // compile-flags:--test ++// ignore-stage1 + + /// A check of using various process termination strategies + /// +diff --git a/tests/rustdoc/pub-extern-crate.rs b/tests/rustdoc/pub-extern-crate.rs +index 26747a4d1ac..98b3068cfd5 100644 +--- a/tests/rustdoc/pub-extern-crate.rs ++++ b/tests/rustdoc/pub-extern-crate.rs +@@ -1,4 +1,5 @@ + // aux-build:pub-extern-crate.rs ++// ignore-stage1 + + // @has pub_extern_crate/index.html + // @!has - '//code' 'pub extern crate inner' +diff --git a/tests/rustdoc/pub-use-extern-macros.rs b/tests/rustdoc/pub-use-extern-macros.rs +index eefe6b4b073..f67ec499459 100644 +--- a/tests/rustdoc/pub-use-extern-macros.rs ++++ b/tests/rustdoc/pub-use-extern-macros.rs +@@ -1,4 +1,5 @@ + // aux-build:pub-use-extern-macros.rs ++// ignore-stage1 + + extern crate macros; + +diff --git a/tests/rustdoc/reexport-check.rs b/tests/rustdoc/reexport-check.rs +index 5908d2150f2..9e3c825558e 100644 +--- a/tests/rustdoc/reexport-check.rs ++++ b/tests/rustdoc/reexport-check.rs +@@ -1,4 +1,6 @@ + // aux-build:reexport-check.rs ++// ignore-stage1 ++ + #![crate_name = "foo"] + + extern crate reexport_check; +diff --git a/tests/rustdoc/reexport-dep-foreign-fn.rs b/tests/rustdoc/reexport-dep-foreign-fn.rs +index e7f5720d583..f09e2da12f8 100644 +--- a/tests/rustdoc/reexport-dep-foreign-fn.rs ++++ b/tests/rustdoc/reexport-dep-foreign-fn.rs +@@ -1,4 +1,5 @@ + // aux-build:all-item-types.rs ++// ignore-stage1 + + // This test is to ensure there is no problem on handling foreign functions + // coming from a dependency. +diff --git a/tests/rustdoc/reexport-doc.rs b/tests/rustdoc/reexport-doc.rs +index df2c889b4d5..52558b39068 100644 +--- a/tests/rustdoc/reexport-doc.rs ++++ b/tests/rustdoc/reexport-doc.rs +@@ -1,4 +1,5 @@ + // aux-build:reexport-doc-aux.rs ++// ignore-stage1 + + extern crate reexport_doc_aux as dep; + +diff --git a/tests/rustdoc/reexports-priv.rs b/tests/rustdoc/reexports-priv.rs +index 571d7f06fdc..bec1096ad14 100644 +--- a/tests/rustdoc/reexports-priv.rs ++++ b/tests/rustdoc/reexports-priv.rs +@@ -1,4 +1,5 @@ + // aux-build: reexports.rs ++// ignore-stage1 + // compile-flags: --document-private-items + + #![crate_name = "foo"] +diff --git a/tests/rustdoc/reexports.rs b/tests/rustdoc/reexports.rs +index 3c51ac395af..018abbfd277 100644 +--- a/tests/rustdoc/reexports.rs ++++ b/tests/rustdoc/reexports.rs +@@ -1,4 +1,5 @@ + // aux-build: reexports.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/rustc-incoherent-impls.rs b/tests/rustdoc/rustc-incoherent-impls.rs +index 3fdefbecc54..c8382a50679 100644 +--- a/tests/rustdoc/rustc-incoherent-impls.rs ++++ b/tests/rustdoc/rustc-incoherent-impls.rs +@@ -1,4 +1,5 @@ + // aux-build:incoherent-impl-types.rs ++// ignore-stage1 + // build-aux-docs + + #![crate_name = "foo"] +diff --git a/tests/rustdoc/test_option_check/bar.rs b/tests/rustdoc/test_option_check/bar.rs +index 50a182cf7e0..6f48c9c923b 100644 +--- a/tests/rustdoc/test_option_check/bar.rs ++++ b/tests/rustdoc/test_option_check/bar.rs +@@ -1,5 +1,6 @@ + // compile-flags: --test + // check-test-line-numbers-match ++// ignore-stage1 + + /// This looks like another awesome test! + /// +diff --git a/tests/rustdoc/test_option_check/test.rs b/tests/rustdoc/test_option_check/test.rs +index 964e8e37ed5..208bccafe4c 100644 +--- a/tests/rustdoc/test_option_check/test.rs ++++ b/tests/rustdoc/test_option_check/test.rs +@@ -1,4 +1,5 @@ + // compile-flags: --test ++// ignore-stage1 + // check-test-line-numbers-match + + pub mod bar; +diff --git a/tests/rustdoc/trait-alias-mention.rs b/tests/rustdoc/trait-alias-mention.rs +index 6da0dc68785..8916e1321c7 100644 +--- a/tests/rustdoc/trait-alias-mention.rs ++++ b/tests/rustdoc/trait-alias-mention.rs +@@ -1,5 +1,6 @@ + // aux-build:trait-alias-mention.rs + // build-aux-docs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/trait-visibility.rs b/tests/rustdoc/trait-visibility.rs +index 8ba3ee03a74..9bd62dd5c0a 100644 +--- a/tests/rustdoc/trait-visibility.rs ++++ b/tests/rustdoc/trait-visibility.rs +@@ -1,4 +1,5 @@ + // aux-build:trait-visibility.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/rustdoc/unit-return.rs b/tests/rustdoc/unit-return.rs +index 6ddfa0c4d5c..a144308a581 100644 +--- a/tests/rustdoc/unit-return.rs ++++ b/tests/rustdoc/unit-return.rs +@@ -1,4 +1,5 @@ + // aux-build:unit-return.rs ++// ignore-stage1 + + #![crate_name = "foo"] + +diff --git a/tests/ui-fulldeps/deriving-encodable-decodable-box.rs b/tests/ui-fulldeps/deriving-encodable-decodable-box.rs +index 1c376f59e51..8f852db5efd 100644 +--- a/tests/ui-fulldeps/deriving-encodable-decodable-box.rs ++++ b/tests/ui-fulldeps/deriving-encodable-decodable-box.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(unused_imports)] + #![feature(rustc_private)] +diff --git a/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs b/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs +index 844d40f2ecd..d0d530ac79f 100644 +--- a/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs ++++ b/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(unused_imports)] + // This briefly tests the capability of `Cell` and `RefCell` to implement the +diff --git a/tests/ui-fulldeps/deriving-global.rs b/tests/ui-fulldeps/deriving-global.rs +index 214bb4368ff..7ff6e31f09e 100644 +--- a/tests/ui-fulldeps/deriving-global.rs ++++ b/tests/ui-fulldeps/deriving-global.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![feature(rustc_private)] + +diff --git a/tests/ui-fulldeps/deriving-hygiene.rs b/tests/ui-fulldeps/deriving-hygiene.rs +index e1084a08fec..f18b703116a 100644 +--- a/tests/ui-fulldeps/deriving-hygiene.rs ++++ b/tests/ui-fulldeps/deriving-hygiene.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(non_upper_case_globals)] + #![feature(rustc_private)] +diff --git a/tests/ui-fulldeps/dropck_tarena_sound_drop.rs b/tests/ui-fulldeps/dropck_tarena_sound_drop.rs +index ffad80171da..d60062be118 100644 +--- a/tests/ui-fulldeps/dropck_tarena_sound_drop.rs ++++ b/tests/ui-fulldeps/dropck_tarena_sound_drop.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(unknown_lints)] + // Check that an arena (TypedArena) can carry elements whose drop +diff --git a/tests/ui-fulldeps/empty-struct-braces-derive.rs b/tests/ui-fulldeps/empty-struct-braces-derive.rs +index 10e8beaa7b1..29419f97aa1 100644 +--- a/tests/ui-fulldeps/empty-struct-braces-derive.rs ++++ b/tests/ui-fulldeps/empty-struct-braces-derive.rs +@@ -1,5 +1,6 @@ + // run-pass + // `#[derive(Trait)]` works for empty structs/variants with braces or parens. ++// ignore-stage1 + + #![feature(rustc_private)] + +diff --git a/tests/ui-fulldeps/issue-14021.rs b/tests/ui-fulldeps/issue-14021.rs +index 309b5c4a03d..5b9fb023d85 100644 +--- a/tests/ui-fulldeps/issue-14021.rs ++++ b/tests/ui-fulldeps/issue-14021.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(unused_mut)] + #![allow(unused_imports)] +diff --git a/tests/ui-fulldeps/regions-mock-tcx.rs b/tests/ui-fulldeps/regions-mock-tcx.rs +index 63975ef62c5..24e008bb76b 100644 +--- a/tests/ui-fulldeps/regions-mock-tcx.rs ++++ b/tests/ui-fulldeps/regions-mock-tcx.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(dead_code)] + #![allow(unused_imports)] +diff --git a/tests/ui-fulldeps/rustc_encodable_hygiene.rs b/tests/ui-fulldeps/rustc_encodable_hygiene.rs +index 509a6b1d22c..ab5f4aed548 100644 +--- a/tests/ui-fulldeps/rustc_encodable_hygiene.rs ++++ b/tests/ui-fulldeps/rustc_encodable_hygiene.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![feature(rustc_private)] + +diff --git a/tests/run-make/cdylib-fewer-symbols/foo.rs b/tests/run-make/cdylib-fewer-symbols/foo.rs +index af37bc8e953..2f080fb37b2 100644 +--- a/tests/run-make/cdylib-fewer-symbols/foo.rs ++++ b/tests/run-make/cdylib-fewer-symbols/foo.rs +@@ -1,5 +1,5 @@ + #![crate_type = "cdylib"] +- ++#[ignore] + #[no_mangle] + pub extern "C" fn foo() -> u32 { + 3 +diff --git a/tests/run-make/doctests-keep-binaries/t.rs b/tests/run-make/doctests-keep-binaries/t.rs +index c38cf0a0b25..13b89c05e03 100644 +--- a/tests/run-make/doctests-keep-binaries/t.rs ++++ b/tests/run-make/doctests-keep-binaries/t.rs +@@ -1,3 +1,4 @@ ++// ignore-stage1 + /// Fungle the foople. + /// ``` + /// t::foople(); +diff --git a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs b/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs +index 260f5a7a64f..c05f9adf46b 100644 +--- a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs ++++ b/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs +@@ -2,6 +2,7 @@ + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + // check-pass ++// ignore-stage1 + + /// ``` + /// #![deprecated(since = "5.2", note = "foo was rarely used. \ +diff --git a/tests/rustdoc-ui/issue-80992.rs b/tests/rustdoc-ui/issue-80992.rs +index 80ff225b879..e589999ae29 100644 +--- a/tests/rustdoc-ui/issue-80992.rs ++++ b/tests/rustdoc-ui/issue-80992.rs +@@ -2,6 +2,7 @@ + // compile-flags:--test + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + pub fn test() -> Result<(), ()> { + //! ```compile_fail +diff --git a/tests/rustdoc-ui/no-run-flag.rs b/tests/rustdoc-ui/no-run-flag.rs +index 181730eb416..33fa85d7d9d 100644 +--- a/tests/rustdoc-ui/no-run-flag.rs ++++ b/tests/rustdoc-ui/no-run-flag.rs +@@ -4,6 +4,7 @@ + // compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1 + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ``` + /// let a = true; +diff --git a/tests/rustdoc-ui/nocapture-fail.rs b/tests/rustdoc-ui/nocapture-fail.rs +index 9a3fb592c63..9899183cdf6 100644 +--- a/tests/rustdoc-ui/nocapture-fail.rs ++++ b/tests/rustdoc-ui/nocapture-fail.rs +@@ -3,6 +3,7 @@ + // normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" + // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ++// ignore-stage1 + + /// ```compile_fail + /// fn foo() { +diff --git a/tests/run-make/issue-22131/foo.rs b/tests/run-make/issue-22131/foo.rs +index 33255d76879..56ffc4224e4 100644 +--- a/tests/run-make/issue-22131/foo.rs ++++ b/tests/run-make/issue-22131/foo.rs +@@ -1,5 +1,6 @@ + /// ```rust + /// assert_eq!(foo::foo(), 1); + /// ``` ++// ignore-stage1 + #[cfg(feature = "bar")] + pub fn foo() -> i32 { 1 } +diff --git a/tests/rustdoc/auto-traits.rs b/tests/rustdoc/auto-traits.rs +index 93d4bf2f656..b0eb5f1af7c 100644 +--- a/tests/rustdoc/auto-traits.rs ++++ b/tests/rustdoc/auto-traits.rs +@@ -1,4 +1,5 @@ + // aux-build:auto-traits.rs ++// ignore-stage1 + + #![feature(auto_traits)] + +diff --git a/tests/rustdoc/inline_cross/dyn_trait.rs b/tests/rustdoc/inline_cross/dyn_trait.rs +index 649d98f7139..82f88a4713c 100644 +--- a/tests/rustdoc/inline_cross/dyn_trait.rs ++++ b/tests/rustdoc/inline_cross/dyn_trait.rs +@@ -1,4 +1,5 @@ + #![crate_name = "user"] ++// ignore-stage1 + + // aux-crate:dyn_trait=dyn_trait.rs + // edition:2021 +diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs +index 0dccb633df9..36e4d04ccaa 100644 +--- a/tests/ui/abi/stack-probes-lto.rs ++++ b/tests/ui/abi/stack-probes-lto.rs +@@ -13,6 +13,7 @@ + // ignore-fuchsia no exception handler registered for segfault + // compile-flags: -C lto + // no-prefer-dynamic ++// ignore-stage1 + // ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino + + include!("stack-probes.rs"); +diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs +index 8137c92304d..9f4edca3caf 100644 +--- a/tests/ui/abi/stack-probes.rs ++++ b/tests/ui/abi/stack-probes.rs +@@ -11,6 +11,7 @@ + // ignore-sgx no processes + // ignore-fuchsia no exception handler registered for segfault + // ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino ++// ignore-stage1 + + use std::env; + use std::mem::MaybeUninit; +diff --git a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs +index 5a6283e9f13..c036f7f03e6 100644 +--- a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs ++++ b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs +@@ -1,7 +1,7 @@ + // Test that slice subslice patterns are correctly handled in const evaluation. + + // run-pass +- ++// ignore-stage1 + #[derive(PartialEq, Debug, Clone)] + struct N(u8); + +diff --git a/tests/ui/asm/x86_64/sym.rs b/tests/ui/asm/x86_64/sym.rs +index 93ef4f09062..6b076924bda 100644 +--- a/tests/ui/asm/x86_64/sym.rs ++++ b/tests/ui/asm/x86_64/sym.rs +@@ -2,6 +2,7 @@ + // only-linux + // needs-asm-support + // run-pass ++// ignore-stage1 + + #![feature(thread_local)] + +diff --git a/tests/ui/associated-type-bounds/fn-apit.rs b/tests/ui/associated-type-bounds/fn-apit.rs +index 3c9f511338f..e8fd5fc3c3e 100644 +--- a/tests/ui/associated-type-bounds/fn-apit.rs ++++ b/tests/ui/associated-type-bounds/fn-apit.rs +@@ -1,6 +1,6 @@ + // run-pass + // aux-build:fn-aux.rs +- ++// ignore-stage1 + #![allow(unused)] + #![feature(associated_type_bounds)] + +diff --git a/tests/ui/associated-type-bounds/fn-dyn-apit.rs b/tests/ui/associated-type-bounds/fn-dyn-apit.rs +index c4e8092c211..7c690f42846 100644 +--- a/tests/ui/associated-type-bounds/fn-dyn-apit.rs ++++ b/tests/ui/associated-type-bounds/fn-dyn-apit.rs +@@ -1,6 +1,7 @@ + // run-pass + // aux-build:fn-dyn-aux.rs + ++// ignore-stage1 + #![allow(unused)] + #![feature(associated_type_bounds)] + +diff --git a/tests/ui/associated-type-bounds/fn-wrap-apit.rs b/tests/ui/associated-type-bounds/fn-wrap-apit.rs +index 96df13e372a..b1df6e867f2 100644 +--- a/tests/ui/associated-type-bounds/fn-wrap-apit.rs ++++ b/tests/ui/associated-type-bounds/fn-wrap-apit.rs +@@ -1,6 +1,7 @@ + // run-pass + // aux-build:fn-aux.rs + ++// ignore-stage1 + #![feature(associated_type_bounds)] + #![allow(dead_code)] + +diff --git a/tests/ui/structs-enums/multiple-reprs.rs b/tests/ui/structs-enums/multiple-reprs.rs +index 4be503a0ef4..2cf0875fc5c 100644 +--- a/tests/ui/structs-enums/multiple-reprs.rs ++++ b/tests/ui/structs-enums/multiple-reprs.rs +@@ -1,4 +1,5 @@ + // run-pass ++// ignore-stage1 + + #![allow(dead_code)] + +diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs +--- a/src/tools/compiletest/src/common.rs ++++ b/src/tools/compiletest/src/common.rs +@@ -431,7 +431,6 @@ + .unwrap() + }; + +- let mut current = None; + let mut all_targets = HashSet::new(); + let mut all_archs = HashSet::new(); + let mut all_oses = HashSet::new(); +@@ -452,14 +451,11 @@ + } + all_pointer_widths.insert(format!("{}bit", cfg.pointer_width)); + +- if target == config.target { +- current = Some(cfg); +- } + all_targets.insert(target.into()); + } + + Self { +- current: current.expect("current target not found"), ++ current: Self::get_current_target_config(config), + all_targets, + all_archs, + all_oses, +@@ -471,6 +467,89 @@ + } + } + ++ fn get_current_target_config(config: &Config) -> TargetCfg { ++ let mut arch = None; ++ let mut os = None; ++ let mut env = None; ++ let mut abi = None; ++ let mut families = Vec::new(); ++ let mut pointer_width = None; ++ let mut endian = None; ++ let mut panic = None; ++ ++ for config in ++ rustc_output(config, &["--print=cfg", "--target", &config.target]).trim().lines() ++ { ++ let (name, value) = config ++ .split_once("=\"") ++ .map(|(name, value)| { ++ ( ++ name, ++ Some( ++ value ++ .strip_suffix("\"") ++ .expect("key-value pair should be properly quoted"), ++ ), ++ ) ++ }) ++ .unwrap_or_else(|| (config, None)); ++ ++ match name { ++ "target_arch" => { ++ arch = Some(value.expect("target_arch should be a key-value pair").to_string()); ++ } ++ "target_os" => { ++ os = Some(value.expect("target_os sould be a key-value pair").to_string()); ++ } ++ "target_env" => { ++ env = Some(value.expect("target_env should be a key-value pair").to_string()); ++ } ++ "target_abi" => { ++ abi = Some(value.expect("target_abi should be a key-value pair").to_string()); ++ } ++ "target_family" => { ++ families ++ .push(value.expect("target_family should be a key-value pair").to_string()); ++ } ++ "target_pointer_width" => { ++ pointer_width = Some( ++ value ++ .expect("target_pointer_width should be a key-value pair") ++ .parse::() ++ .expect("target_pointer_width should be a valid u32"), ++ ); ++ } ++ "target_endian" => { ++ endian = Some(match value.expect("target_endian should be a key-value pair") { ++ "big" => Endian::Big, ++ "little" => Endian::Little, ++ _ => panic!("target_endian should be either 'big' or 'little'"), ++ }); ++ } ++ "panic" => { ++ panic = Some(match value.expect("panic should be a key-value pair") { ++ "abort" => PanicStrategy::Abort, ++ "unwind" => PanicStrategy::Unwind, ++ _ => panic!("panic should be either 'abort' or 'unwind'"), ++ }); ++ } ++ _ => (), ++ } ++ } ++ ++ TargetCfg { ++ arch: arch.expect("target configuration should specify target_arch"), ++ os: os.expect("target configuration should specify target_os"), ++ env: env.expect("target configuration should specify target_env"), ++ abi: abi.expect("target configuration should specify target_abi"), ++ families, ++ pointer_width: pointer_width ++ .expect("target configuration should specify target_pointer_width"), ++ endian: endian.expect("target configuration should specify target_endian"), ++ panic: panic.expect("target configuration should specify panic"), ++ } ++ } ++ + // #[cfg(bootstrap)] + // Needed only for one cycle, remove during the bootstrap bump. + fn collect_all_slow(config: &Config) -> HashMap { +diff --git a/tests/run-make/issue-47551/Makefile b/tests/run-make/issue-47551/Makefile +index 5a6ac725701..9290f2e0555 100644 +--- a/tests/run-make/issue-47551/Makefile ++++ b/tests/run-make/issue-47551/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # only-linux + # ignore-32bit + +diff --git a/tests/run-make/pgo-branch-weights/Makefile b/tests/run-make/pgo-branch-weights/Makefile +index c60206a1f34..4666be03b85 100644 +--- a/tests/run-make/pgo-branch-weights/Makefile ++++ b/tests/run-make/pgo-branch-weights/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + # ignore-windows-gnu + +diff --git a/tests/run-make/pgo-gen-lto/Makefile b/tests/run-make/pgo-gen-lto/Makefile +index 3f2f6a838b5..9e4f555d21c 100644 +--- a/tests/run-make/pgo-gen-lto/Makefile ++++ b/tests/run-make/pgo-gen-lto/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + # ignore-windows-gnu + +diff --git a/tests/run-make/pgo-gen/Makefile b/tests/run-make/pgo-gen/Makefile +index 4623a74957b..22aed059cf4 100644 +--- a/tests/run-make/pgo-gen/Makefile ++++ b/tests/run-make/pgo-gen/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + # ignore-windows-gnu + +diff --git a/tests/run-make/pgo-indirect-call-promotion/Makefile b/tests/run-make/pgo-indirect-call-promotion/Makefile +index 45302215cc6..519447882ea 100644 +--- a/tests/run-make/pgo-indirect-call-promotion/Makefile ++++ b/tests/run-make/pgo-indirect-call-promotion/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + # ignore-windows-gnu + +diff --git a/tests/run-make/pgo-use/Makefile b/tests/run-make/pgo-use/Makefile +index 3bac9b77aa3..5c64b2342e1 100644 +--- a/tests/run-make/pgo-use/Makefile ++++ b/tests/run-make/pgo-use/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + # ignore-windows-gnu + +diff --git a/tests/run-make/profile/Makefile b/tests/run-make/profile/Makefile +index fffc051adbf..42a63a871d6 100644 +--- a/tests/run-make/profile/Makefile ++++ b/tests/run-make/profile/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + # needs-profiler-support + + include ../tools.mk +diff --git a/tests/run-make/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile +index 1e267fb9576..e3e83c52cc2 100644 +--- a/tests/run-make/sysroot-crates-are-unstable/Makefile ++++ b/tests/run-make/sysroot-crates-are-unstable/Makefile +@@ -1,2 +1,3 @@ ++# ignore-stage1 + all: + '$(PYTHON)' test.py +diff --git a/tests/run-make/target-specs/Makefile b/tests/run-make/target-specs/Makefile +index a33f5368e3c..84459293364 100644 +--- a/tests/run-make/target-specs/Makefile ++++ b/tests/run-make/target-specs/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + include ../tools.mk + all: + $(RUSTC) foo.rs --target=my-awesome-platform.json --crate-type=lib --emit=asm +diff --git a/tests/ui/functions-closures/fn-help-with-err.rs b/tests/ui/functions-closures/fn-help-with-err.rs +index 612fe1b8419..d021f33c550 100644 +--- a/tests/ui/functions-closures/fn-help-with-err.rs ++++ b/tests/ui/functions-closures/fn-help-with-err.rs +@@ -1,4 +1,5 @@ + // This test case checks the behavior of typeck::check::method::suggest::is_fn on Ty::Error. ++// ignore-stage1 + + struct Foo; + +diff --git a/tests/run-make/pointer-auth-link-with-c/Makefile b/tests/run-make/pointer-auth-link-with-c/Makefile +index dffbd303582..5347d0a90f1 100644 +--- a/tests/run-make/pointer-auth-link-with-c/Makefile ++++ b/tests/run-make/pointer-auth-link-with-c/Makefile +@@ -1,3 +1,4 @@ ++# ignore-stage1 + include ../tools.mk + + # only-aarch64 diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index a0a788f360..0009c50172 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -6,6 +6,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://0001-Do-not-use-LFS64-on-linux-with-musl.patch;patchdir=${RUSTSRC} \ file://zlib-off64_t.patch;patchdir=${RUSTSRC} \ file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${RUSTSRC} \ + file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ " SRC_URI[rust.sha256sum] = "bb8e9c564566b2d3228d95de9063a9254182446a161353f1d843bfbaf5c34639" diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb b/meta/recipes-devtools/rust/rust_1.70.0.bb index 8669291d08..3b9c05a19f 100644 --- a/meta/recipes-devtools/rust/rust_1.70.0.bb +++ b/meta/recipes-devtools/rust/rust_1.70.0.bb @@ -66,6 +66,7 @@ do_rust_setup_snapshot () { fi } addtask rust_setup_snapshot after do_unpack before do_configure +addtask do_test_compile after do_configure do_rust_gen_targets do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" @@ -223,6 +224,11 @@ FILES:${PN}-dev = "" do_compile () { } +do_test_compile[dirs] = "${B}" +do_test_compile () { + rust_runx build src/tools/remote-test-server --target "${RUST_TARGET_SYS}" +} + ALLOW_EMPTY:${PN} = "1" PACKAGES =+ "${PN}-tools-clippy ${PN}-tools-rustfmt"