diff options
| -rwxr-xr-x | compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/build_system/src/test.rs | 22 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 52 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/mod.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 46 | ||||
| -rw-r--r-- | src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile | 2 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/dist-various-1/Dockerfile | 2 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/test-various/Dockerfile | 10 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile | 2 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/adding.md | 2 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/best-practices.md | 8 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/compiletest.md | 15 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/directives.md | 40 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/misc.md | 4 | ||||
| -rw-r--r-- | src/tools/compiletest/src/common.rs | 4 | ||||
| -rw-r--r-- | src/tools/compiletest/src/directives.rs | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest/run_make.rs | 11 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/external_deps/cargo.rs | 14 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 5 | ||||
| -rw-r--r-- | src/tools/tidy/src/deps.rs | 2 | ||||
| -rw-r--r-- | tests/run-make-cargo/apple-slow-tls/rmake.rs (renamed from tests/run-make/apple-slow-tls/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/apple-slow-tls/tls_test/Cargo.toml (renamed from tests/run-make/apple-slow-tls/tls_test/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/apple-slow-tls/tls_test/src/main.rs (renamed from tests/run-make/apple-slow-tls/tls_test/src/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/compiler-builtins/Cargo.toml (renamed from tests/run-make/compiler-builtins/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/compiler-builtins/lib.rs (renamed from tests/run-make/compiler-builtins/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/compiler-builtins/rmake.rs (renamed from tests/run-make/compiler-builtins/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustc-crates-on-stable/rmake.rs (renamed from tests/run-make/rustc-crates-on-stable/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/Cargo.toml (renamed from tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/complex.rs (renamed from tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/tester.rs (renamed from tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/src/lib.rs (renamed from tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/rustdoc-scrape-examples-paths/rmake.rs (renamed from tests/run-make/rustdoc-scrape-examples-paths/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-cortex-m/rmake.rs (renamed from tests/run-make/thumb-none-cortex-m/rmake.rs) | 2 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/example/.cargo/config.toml (renamed from tests/run-make/thumb-none-qemu/example/.cargo/config.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/example/Cargo.lock (renamed from tests/run-make/thumb-none-qemu/example/Cargo.lock) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/example/Cargo.toml (renamed from tests/run-make/thumb-none-qemu/example/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/example/memory.x (renamed from tests/run-make/thumb-none-qemu/example/memory.x) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/example/src/main.rs (renamed from tests/run-make/thumb-none-qemu/example/src/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/thumb-none-qemu/rmake.rs (renamed from tests/run-make/thumb-none-qemu/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/uefi-qemu/rmake.rs (renamed from tests/run-make/uefi-qemu/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.lock (renamed from tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.lock) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.toml (renamed from tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/uefi-qemu/uefi_qemu_test/src/main.rs (renamed from tests/run-make/uefi-qemu/uefi_qemu_test/src/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rmake.rs (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks) | 0 | ||||
| -rw-r--r-- | tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks (renamed from tests/run-make/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks) | 0 | ||||
| -rw-r--r-- | triagebot.toml | 3 |
72 files changed, 177 insertions, 78 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh index 52e02c857c7..62f1cc6a893 100755 --- a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh +++ b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh @@ -121,7 +121,7 @@ rm tests/ui/abi/large-byval-align.rs # exceeds implementation limit of Cranelift # ============================================================ rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump rm -r tests/run-make/strip # same -rm -r tests/run-make/compiler-builtins # Expects lib/rustlib/src/rust to contains the standard library source +rm -r tests/run-make-cargo/compiler-builtins # Expects lib/rustlib/src/rust to contains the standard library source rm -r tests/run-make/translation # same rm -r tests/run-make/missing-unstable-trait-bound # This disables support for unstable features, but running cg_clif needs some unstable features rm -r tests/run-make/const-trait-stable-toolchain # same @@ -166,5 +166,5 @@ index 073116933bd..c3e4578204d 100644 EOF echo "[TEST] rustc test suite" -./x.py test --stage 0 --test-args=--no-capture tests/{codegen-units,run-make,ui,incremental} +./x.py test --stage 0 --test-args=--no-capture tests/{codegen-units,run-make,run-make-cargo,ui,incremental} popd diff --git a/compiler/rustc_codegen_gcc/build_system/src/test.rs b/compiler/rustc_codegen_gcc/build_system/src/test.rs index 3dd3fce2eec..1823aa71f40 100644 --- a/compiler/rustc_codegen_gcc/build_system/src/test.rs +++ b/compiler/rustc_codegen_gcc/build_system/src/test.rs @@ -1083,11 +1083,12 @@ where fn test_rustc(env: &Env, args: &TestArg) -> Result<(), String> { test_rustc_inner(env, args, |_| Ok(false), false, "run-make")?; + test_rustc_inner(env, args, |_| Ok(false), false, "run-make-cargo")?; test_rustc_inner(env, args, |_| Ok(false), false, "ui") } fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> { - let result1 = test_rustc_inner( + let run_make_result = test_rustc_inner( env, args, retain_files_callback("tests/failing-run-make-tests.txt", "run-make"), @@ -1095,7 +1096,15 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> { "run-make", ); - let result2 = test_rustc_inner( + let run_make_cargo_result = test_rustc_inner( + env, + args, + retain_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"), + false, + "run-make", + ); + + let ui_result = test_rustc_inner( env, args, retain_files_callback("tests/failing-ui-tests.txt", "ui"), @@ -1103,7 +1112,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> { "ui", ); - result1.and(result2) + run_make_result.and(run_make_cargo_result).and(ui_result) } fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> { @@ -1120,6 +1129,13 @@ fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> { remove_files_callback("tests/failing-run-make-tests.txt", "run-make"), false, "run-make", + )?; + test_rustc_inner( + env, + args, + remove_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"), + false, + "run-make-cargo", ) } diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index cb81d738666..4f839bdf7b8 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1522,6 +1522,12 @@ test!(Pretty { }); test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true }); +test!(RunMakeCargo { + path: "tests/run-make-cargo", + mode: "run-make", + suite: "run-make-cargo", + default: true +}); test!(AssemblyLlvm { path: "tests/assembly-llvm", @@ -1773,7 +1779,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the target, }); } - if suite == "run-make" { + if mode == "run-make" { builder.tool_exe(Tool::RunMakeSupport); } @@ -1816,25 +1822,41 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the let is_rustdoc = suite == "rustdoc-ui" || suite == "rustdoc-js"; + // There are (potentially) 2 `cargo`s to consider: + // + // - A "bootstrap" cargo, which is the same cargo used to build bootstrap itself, and is + // used to build the `run-make` test recipes and the `run-make-support` test library. All + // of these may not use unstable rustc/cargo features. + // - An in-tree cargo, which should be considered as under test. The `run-make-cargo` test + // suite is intended to support the use case of testing the "toolchain" (that is, at the + // minimum the interaction between in-tree cargo + rustc) together. + // + // For build time and iteration purposes, we partition `run-make` tests which needs an + // in-tree cargo (a smaller subset) versus `run-make` tests that do not into two test + // suites, `run-make` and `run-make-cargo`. That way, contributors who do not need to run + // the `run-make` tests that need in-tree cargo do not need to spend time building in-tree + // cargo. if mode == "run-make" { - let cargo_path = if test_compiler.stage == 0 { - // If we're using `--stage 0`, we should provide the bootstrap cargo. - builder.initial_cargo.clone() - } else { - builder - .ensure(tool::Cargo::from_build_compiler( - builder.compiler(test_compiler.stage - 1, test_compiler.host), - test_compiler.host, - )) - .tool_path - }; - - cmd.arg("--cargo-path").arg(cargo_path); - // We need to pass the compiler that was used to compile run-make-support, // because we have to use the same compiler to compile rmake.rs recipes. let stage0_rustc_path = builder.compiler(0, test_compiler.host); cmd.arg("--stage0-rustc-path").arg(builder.rustc(stage0_rustc_path)); + + if suite == "run-make-cargo" { + let cargo_path = if test_compiler.stage == 0 { + // If we're using `--stage 0`, we should provide the bootstrap cargo. + builder.initial_cargo.clone() + } else { + builder + .ensure(tool::Cargo::from_build_compiler( + builder.compiler(test_compiler.stage - 1, test_compiler.host), + test_compiler.host, + )) + .tool_path + }; + + cmd.arg("--cargo-path").arg(cargo_path); + } } // Avoid depending on rustdoc when we don't need it. diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index a818a5c756c..75c8ee36528 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -444,6 +444,7 @@ const PATH_REMAP: &[(&str, &[&str])] = &[ "tests/mir-opt", "tests/pretty", "tests/run-make", + "tests/run-make-cargo", "tests/rustdoc", "tests/rustdoc-gui", "tests/rustdoc-js", @@ -1128,8 +1129,8 @@ impl<'a> Builder<'a> { test::RustInstaller, test::TestFloatParse, test::CollectLicenseMetadata, - // Run run-make last, since these won't pass without make on Windows test::RunMake, + test::RunMakeCargo, ), Kind::Miri => describe!(test::Crate), Kind::Bench => describe!(test::Crate, test::CrateLibrustc), diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 19cfe79be5d..89a0ab7711e 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -2152,8 +2152,9 @@ mod snapshot { [build] rustc 0 <host> -> HtmlChecker 1 <host> [test] html-check <host> [build] rustc 0 <host> -> RunMakeSupport 1 <host> - [build] rustc 0 <host> -> cargo 1 <host> [test] compiletest-run-make 1 <host> + [build] rustc 0 <host> -> cargo 1 <host> + [test] compiletest-run-make-cargo 1 <host> "); } @@ -2171,7 +2172,6 @@ mod snapshot { [test] compiletest-ui 1 <host> [test] compiletest-ui-fulldeps 1 <host> [build] rustc 0 <host> -> RunMakeSupport 1 <host> - [build] rustc 0 <host> -> cargo 1 <host> [build] rustdoc 1 <host> [test] compiletest-run-make 1 <host> [test] compiletest-rustdoc 1 <host> @@ -2200,7 +2200,6 @@ mod snapshot { [build] rustc 2 <host> -> rustc 3 <host> [test] compiletest-ui-fulldeps 2 <host> [build] rustc 0 <host> -> RunMakeSupport 1 <host> - [build] rustc 1 <host> -> cargo 2 <host> [build] rustdoc 2 <host> [test] compiletest-run-make 2 <host> [test] compiletest-rustdoc 2 <host> @@ -2234,7 +2233,6 @@ mod snapshot { [build] rustc 2 <host> -> rustc 3 <target1> [test] compiletest-ui-fulldeps 2 <target1> [build] rustc 0 <host> -> RunMakeSupport 1 <host> - [build] rustc 1 <host> -> cargo 2 <host> [build] rustdoc 2 <host> [test] compiletest-run-make 2 <target1> [test] compiletest-rustdoc 2 <target1> @@ -2329,8 +2327,9 @@ mod snapshot { [build] rustc 0 <host> -> HtmlChecker 1 <host> [test] html-check <host> [build] rustc 0 <host> -> RunMakeSupport 1 <host> - [build] rustc 1 <host> -> cargo 2 <host> [test] compiletest-run-make 2 <host> + [build] rustc 1 <host> -> cargo 2 <host> + [test] compiletest-run-make-cargo 2 <host> "); } @@ -2464,6 +2463,43 @@ mod snapshot { "); } + // Differential snapshots for `./x test run-make` run `./x test run-make-cargo`: only + // `run-make-cargo` should build an in-tree cargo, running `./x test run-make` should not. + #[test] + fn test_run_make_no_cargo() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("test") + .path("run-make") + .render_steps(), @r" + [build] llvm <host> + [build] rustc 0 <host> -> rustc 1 <host> + [build] rustc 0 <host> -> RunMakeSupport 1 <host> + [build] rustc 1 <host> -> std 1 <host> + [build] rustc 0 <host> -> Compiletest 1 <host> + [build] rustdoc 1 <host> + [test] compiletest-run-make 1 <host> + "); + } + + #[test] + fn test_run_make_cargo_builds_cargo() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("test") + .path("run-make-cargo") + .render_steps(), @r" + [build] llvm <host> + [build] rustc 0 <host> -> rustc 1 <host> + [build] rustc 0 <host> -> RunMakeSupport 1 <host> + [build] rustc 1 <host> -> std 1 <host> + [build] rustc 0 <host> -> Compiletest 1 <host> + [build] rustc 0 <host> -> cargo 1 <host> + [build] rustdoc 1 <host> + [test] compiletest-run-make-cargo 1 <host> + "); + } + #[test] fn doc_all() { let ctx = TestCtx::new(); diff --git a/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile b/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile index cf030f6830e..71de8f917fa 100644 --- a/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile +++ b/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile @@ -54,4 +54,4 @@ ENV RUST_CONFIGURE_ARGS \ ENV SCRIPT \ python3 ../x.py --stage 2 build && \ - python3 ../x.py --stage 2 test tests/run-make + python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile index 4d5980027ca..e59012ff6af 100644 --- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile @@ -158,7 +158,7 @@ ENV RUST_CONFIGURE_ARGS \ --disable-docs ENV SCRIPT \ - python3 ../x.py --stage 2 test --host='' --target $RUN_MAKE_TARGETS tests/run-make && \ + python3 ../x.py --stage 2 test --host='' --target $RUN_MAKE_TARGETS tests/run-make tests/run-make-cargo && \ python3 ../x.py dist --host='' --target $TARGETS # sccache diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile index 6ff529c9e71..e1c882d5b08 100644 --- a/src/ci/docker/host-x86_64/test-various/Dockerfile +++ b/src/ci/docker/host-x86_64/test-various/Dockerfile @@ -60,9 +60,10 @@ RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v19.0 tar -xJ ENV PATH "$PATH:/wasmtime-v19.0.0-x86_64-linux" -ENV WASM_WASIP_TARGET=wasm32-wasip1 +ENV WASM_WASIP_TARGET=wasm32-wasip1 ENV WASM_WASIP_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_WASIP_TARGET \ tests/run-make \ + tests/run-make-cargo \ tests/ui \ tests/mir-opt \ tests/codegen-units \ @@ -73,6 +74,7 @@ ENV WASM_WASIP_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $ ENV NVPTX_TARGETS=nvptx64-nvidia-cuda ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $NVPTX_TARGETS \ tests/run-make \ + tests/run-make-cargo \ tests/assembly-llvm ENV MUSL_TARGETS=x86_64-unknown-linux-musl \ @@ -88,8 +90,8 @@ ENV UEFI_TARGETS=aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi \ CC_x86_64_unknown_uefi=clang-11 \ CXX_x86_64_unknown_uefi=clang++-11 ENV UEFI_SCRIPT python3 /checkout/x.py --stage 2 build --host='' --target $UEFI_TARGETS && \ - python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \ - python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target i686-unknown-uefi && \ - python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target x86_64-unknown-uefi + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \ + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target i686-unknown-uefi && \ + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target x86_64-unknown-uefi ENV SCRIPT $WASM_WASIP_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile index 5052d86f0ac..7e6a59aaf89 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile @@ -56,4 +56,4 @@ ENV RUST_CONFIGURE_ARGS \ ENV SCRIPT \ python3 ../x.py --stage 2 build && \ python3 ../x.py --stage 2 test tests/ui && \ - python3 ../x.py --stage 2 test tests/run-make + python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo diff --git a/src/doc/rustc-dev-guide/src/tests/adding.md b/src/doc/rustc-dev-guide/src/tests/adding.md index e5c26bef11d..46b8a1e4cf4 100644 --- a/src/doc/rustc-dev-guide/src/tests/adding.md +++ b/src/doc/rustc-dev-guide/src/tests/adding.md @@ -29,6 +29,8 @@ guidelines: suites. - Need to inspect the resulting binary in some way? Or if all the other test suites are too limited for your purposes? Then use `run-make`. + - Use `run-make-cargo` if you need to exercise in-tree `cargo` in conjunction + with in-tree `rustc`. - Check out the [compiletest] chapter for more specialized test suites. After deciding on which kind of test to add, see [best diff --git a/src/doc/rustc-dev-guide/src/tests/best-practices.md b/src/doc/rustc-dev-guide/src/tests/best-practices.md index be00207e3fb..efc626035b7 100644 --- a/src/doc/rustc-dev-guide/src/tests/best-practices.md +++ b/src/doc/rustc-dev-guide/src/tests/best-practices.md @@ -83,10 +83,10 @@ related tests. - E.g. for an implementation of RFC 2093 specifically, we can group a collection of tests under `tests/ui/rfc-2093-infer-outlives/`. For the directory name, include what the RFC is about. -- For the [`run-make`] test suite, each `rmake.rs` must be contained within an - immediate subdirectory under `tests/run-make/`. Further nesting is not - presently supported. Avoid including issue number in the directory name too, - include that info in a comment inside `rmake.rs`. +- For the [`run-make`]/`run-make-support` test suites, each `rmake.rs` must + be contained within an immediate subdirectory under `tests/run-make/` or + `tests/run-make-cargo/` respectively. Further nesting is not presently + supported. Avoid using _only_ an issue number for the test name as well. ## Test descriptions diff --git a/src/doc/rustc-dev-guide/src/tests/compiletest.md b/src/doc/rustc-dev-guide/src/tests/compiletest.md index 4980ed845d6..a4a729935fa 100644 --- a/src/doc/rustc-dev-guide/src/tests/compiletest.md +++ b/src/doc/rustc-dev-guide/src/tests/compiletest.md @@ -397,13 +397,19 @@ your test, causing separate files to be generated for 32bit and 64bit systems. ### `run-make` tests -The tests in [`tests/run-make`] are general-purpose tests using Rust *recipes*, -which are small programs (`rmake.rs`) allowing arbitrary Rust code such as -`rustc` invocations, and is supported by a [`run_make_support`] library. Using -Rust recipes provide the ultimate in flexibility. +The tests in [`tests/run-make`] and [`tests/run-make-cargo`] are general-purpose +tests using Rust *recipes*, which are small programs (`rmake.rs`) allowing +arbitrary Rust code such as `rustc` invocations, and is supported by a +[`run_make_support`] library. Using Rust recipes provide the ultimate in +flexibility. `run-make` tests should be used if no other test suites better suit your needs. +The `run-make-cargo` test suite additionally builds an in-tree `cargo` to support +use cases that require testing in-tree `cargo` in conjunction with in-tree `rustc`. +The `run-make` test suite does not have access to in-tree `cargo` (so it can be the +faster-to-iterate test suite). + #### Using Rust recipes Each test should be in a separate directory with a `rmake.rs` Rust program, @@ -476,6 +482,7 @@ Then add a corresponding entry to `"rust-analyzer.linkedProjects"` ``` [`tests/run-make`]: https://github.com/rust-lang/rust/tree/master/tests/run-make +[`tests/run-make-cargo`]: https://github.com/rust-lang/rust/tree/master/tests/run-make-cargo [`run_make_support`]: https://github.com/rust-lang/rust/tree/master/src/tools/run-make-support ### Coverage tests diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index fbbeb7e97d3..4ff6b7cb10f 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -52,14 +52,14 @@ not be exhaustive. Directives can generally be found by browsing the See [Building auxiliary crates](compiletest.html#building-auxiliary-crates) -| Directive | Explanation | Supported test suites | Possible values | -|-----------------------|-------------------------------------------------------------------------------------------------------|-----------------------|-----------------------------------------------| -| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make` | Path to auxiliary `.rs` file | -| `aux-build` | Build a separate crate from the named source file | All except `run-make` | Path to auxiliary `.rs` file | -| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make` | `<extern_prelude_name>=<path/to/aux/file.rs>` | -| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file | -| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make` | Path to auxiliary proc-macro `.rs` file | -| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make` | N/A | +| Directive | Explanation | Supported test suites | Possible values | +|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------| +| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file | +| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file | +| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `<extern_prelude_name>=<path/to/aux/file.rs>` | +| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file | +| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file | +| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A | [^pm]: please see the [Auxiliary proc-macro section](compiletest.html#auxiliary-proc-macro) in the compiletest chapter for specifics. @@ -243,18 +243,18 @@ ignoring debuggers. ### Affecting how tests are built -| Directive | Explanation | Supported test suites | Possible values | -|---------------------|----------------------------------------------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------| -| `compile-flags` | Flags passed to `rustc` when building the test or aux file | All except for `run-make` | Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental` or `--edition` | -| `edition` | The edition used to build the test | All except for `run-make` | Any valid `--edition` value | -| `rustc-env` | Env var to set when running `rustc` | All except for `run-make` | `<KEY>=<VALUE>` | -| `unset-rustc-env` | Env var to unset when running `rustc` | All except for `run-make` | Any env var name | -| `incremental` | Proper incremental support for tests outside of incremental test suite | `ui`, `crashes` | N/A | -| `no-prefer-dynamic` | Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag | `ui`, `crashes` | N/A | +| Directive | Explanation | Supported test suites | Possible values | +|---------------------|----------------------------------------------------------------------------------------------|--------------------------------------------|--------------------------------------------------------------------------------------------| +| `compile-flags` | Flags passed to `rustc` when building the test or aux file | All except for `run-make`/`run-make-cargo` | Any valid `rustc` flags, e.g. `-Awarnings -Dfoo`. Cannot be `-Cincremental` or `--edition` | +| `edition` | The edition used to build the test | All except for `run-make`/`run-make-cargo` | Any valid `--edition` value | +| `rustc-env` | Env var to set when running `rustc` | All except for `run-make`/`run-make-cargo` | `<KEY>=<VALUE>` | +| `unset-rustc-env` | Env var to unset when running `rustc` | All except for `run-make`/`run-make-cargo` | Any env var name | +| `incremental` | Proper incremental support for tests outside of incremental test suite | `ui`, `crashes` | N/A | +| `no-prefer-dynamic` | Don't use `-C prefer-dynamic`, don't build as a dylib via a `--crate-type=dylib` preset flag | `ui`, `crashes` | N/A | <div class="warning"> -Tests (outside of `run-make`) that want to use incremental tests not in the +Tests (outside of `run-make`/`run-make-cargo`) that want to use incremental tests not in the incremental test-suite must not pass `-C incremental` via `compile-flags`, and must instead use the `//@ incremental` directive. @@ -264,9 +264,9 @@ Consider writing the test as a proper incremental test instead. ### Rustdoc -| Directive | Explanation | Supported test suites | Possible values | -|-------------|--------------------------------------------------------------|------------------------------------------|---------------------------| -| `doc-flags` | Flags passed to `rustdoc` when building the test or aux file | `rustdoc`, `rustdoc-js`, `rustdoc-json` | Any valid `rustdoc` flags | +| Directive | Explanation | Supported test suites | Possible values | +|-------------|--------------------------------------------------------------|-----------------------------------------|---------------------------| +| `doc-flags` | Flags passed to `rustdoc` when building the test or aux file | `rustdoc`, `rustdoc-js`, `rustdoc-json` | Any valid `rustdoc` flags | <!-- **FIXME(rustdoc)**: what does `check-test-line-numbers-match` do? diff --git a/src/doc/rustc-dev-guide/src/tests/misc.md b/src/doc/rustc-dev-guide/src/tests/misc.md index 39f88174879..cc8f501224f 100644 --- a/src/doc/rustc-dev-guide/src/tests/misc.md +++ b/src/doc/rustc-dev-guide/src/tests/misc.md @@ -24,8 +24,8 @@ In `ui` tests and other test suites that support `//@ rustc-env`, you can specif //@ rustc-env:RUSTC_BOOTSTRAP=-1 ``` -For `run-make` tests, `//@ rustc-env` is not supported. You can do something -like the following for individual `rustc` invocations. +For `run-make`/`run-make-cargo` tests, `//@ rustc-env` is not supported. You can do +something like the following for individual `rustc` invocations. ```rust,ignore use run_make_support::rustc; diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 62fdee98735..143ccdcb9e5 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -67,6 +67,7 @@ string_enum! { MirOpt => "mir-opt", Pretty => "pretty", RunMake => "run-make", + RunMakeCargo => "run-make-cargo", Rustdoc => "rustdoc", RustdocGui => "rustdoc-gui", RustdocJs => "rustdoc-js", @@ -269,9 +270,6 @@ pub struct Config { /// between e.g. beta `cargo` vs in-tree `cargo`. /// /// FIXME: maybe rename this to reflect that this is a *staged* host cargo. - /// - /// FIXME(#134109): split `run-make` into two test suites, a test suite *with* staged cargo, and - /// another test suite *without*. pub cargo_path: Option<Utf8PathBuf>, /// Path to the stage 0 `rustc` used to build `run-make` recipes. This must not be confused with diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index f2ad049d526..857953072c4 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -1012,7 +1012,7 @@ impl Config { if let Some(raw) = self.parse_name_value_directive(line, "revisions", testfile, line_number) { if self.mode == TestMode::RunMake { - panic!("`run-make` tests do not support revisions: {}", testfile); + panic!("`run-make` mode tests do not support revisions: {}", testfile); } let mut duplicates: HashSet<_> = existing.iter().cloned().collect(); diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs index 8a0e45cf8ca..738f504d5c1 100644 --- a/src/tools/compiletest/src/runtest/run_make.rs +++ b/src/tools/compiletest/src/runtest/run_make.rs @@ -5,11 +5,12 @@ use build_helper::fs::{ignore_not_found, recursive_remove}; use camino::{Utf8Path, Utf8PathBuf}; use super::{ProcRes, TestCx, disable_error_reporting}; +use crate::common::TestSuite; use crate::util::{copy_dir_all, dylib_env_var}; impl TestCx<'_> { pub(super) fn run_rmake_test(&self) { - // For `run-make` V2, we need to perform 2 steps to build and run a `run-make` V2 recipe + // For `run-make`, we need to perform 2 steps to build and run a `run-make` recipe // (`rmake.rs`) to run the actual tests. The support library is already built as a tool rust // library and is available under // `build/$HOST/bootstrap-tools/$TARGET/release/librun_make_support.rlib`. @@ -189,8 +190,12 @@ impl TestCx<'_> { // through a specific CI runner). .env("LLVM_COMPONENTS", &self.config.llvm_components); - if let Some(ref cargo) = self.config.cargo_path { - cmd.env("CARGO", cargo); + // Only `run-make-cargo` test suite gets an in-tree `cargo`, not `run-make`. + if self.config.suite == TestSuite::RunMakeCargo { + cmd.env( + "CARGO", + self.config.cargo_path.as_ref().expect("cargo must be built and made available"), + ); } if let Some(ref rustdoc) = self.config.rustdoc_path { diff --git a/src/tools/run-make-support/src/external_deps/cargo.rs b/src/tools/run-make-support/src/external_deps/cargo.rs index 8da9f002c41..3f2d0ce14e3 100644 --- a/src/tools/run-make-support/src/external_deps/cargo.rs +++ b/src/tools/run-make-support/src/external_deps/cargo.rs @@ -1,11 +1,17 @@ use crate::command::Command; -use crate::env_var; use crate::util::set_host_compiler_dylib_path; -/// Returns a command that can be used to invoke cargo. The cargo is provided by compiletest -/// through the `CARGO` env var. +/// Returns a command that can be used to invoke in-tree cargo. The cargo is provided by compiletest +/// through the `CARGO` env var, and is **only** available for the `run-make-cargo` test suite. pub fn cargo() -> Command { - let mut cmd = Command::new(env_var("CARGO")); + let cargo_path = std::env::var("CARGO").unwrap_or_else(|e| { + panic!( + "in-tree `cargo` should be available for `run-make-cargo` test suite, but not \ + `run-make` test suite: {e}" + ) + }); + + let mut cmd = Command::new(cargo_path); set_host_compiler_dylib_path(&mut cmd); cmd } diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index 191e205f257..fef75401d94 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -1,7 +1,8 @@ //! `run-make-support` is a support library for run-make tests. It provides command wrappers and //! convenience utility functions to help test writers reduce duplication. The support library -//! notably is built via cargo: this means that if your test wants some non-trivial utility, such -//! as `object` or `wasmparser`, they can be re-exported and be made available through this library. +//! notably is built via bootstrap cargo: this means that if your test wants some non-trivial +//! utility, such as `object` or `wasmparser`, they can be re-exported and be made available through +//! this library. #![warn(unreachable_pub)] diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 560f11ecf50..fee48bea144 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -80,7 +80,7 @@ pub(crate) const WORKSPACES: &[(&str, ExceptionList, Option<(&[&str], &[&str])>, ("src/tools/rustbook", EXCEPTIONS_RUSTBOOK, None, &["src/doc/book", "src/doc/reference"]), ("src/tools/rustc-perf", EXCEPTIONS_RUSTC_PERF, None, &["src/tools/rustc-perf"]), ("src/tools/test-float-parse", EXCEPTIONS, None, &[]), - ("tests/run-make/uefi-qemu/uefi_qemu_test", EXCEPTIONS_UEFI_QEMU_TEST, None, &[]), + ("tests/run-make-cargo/uefi-qemu/uefi_qemu_test", EXCEPTIONS_UEFI_QEMU_TEST, None, &[]), // tidy-alphabetical-end ]; diff --git a/tests/run-make/apple-slow-tls/rmake.rs b/tests/run-make-cargo/apple-slow-tls/rmake.rs index 231e0b1668e..231e0b1668e 100644 --- a/tests/run-make/apple-slow-tls/rmake.rs +++ b/tests/run-make-cargo/apple-slow-tls/rmake.rs diff --git a/tests/run-make/apple-slow-tls/tls_test/Cargo.toml b/tests/run-make-cargo/apple-slow-tls/tls_test/Cargo.toml index c8e5a228eef..c8e5a228eef 100644 --- a/tests/run-make/apple-slow-tls/tls_test/Cargo.toml +++ b/tests/run-make-cargo/apple-slow-tls/tls_test/Cargo.toml diff --git a/tests/run-make/apple-slow-tls/tls_test/src/main.rs b/tests/run-make-cargo/apple-slow-tls/tls_test/src/main.rs index d48d22bb3d1..d48d22bb3d1 100644 --- a/tests/run-make/apple-slow-tls/tls_test/src/main.rs +++ b/tests/run-make-cargo/apple-slow-tls/tls_test/src/main.rs diff --git a/tests/run-make/compiler-builtins/Cargo.toml b/tests/run-make-cargo/compiler-builtins/Cargo.toml index 869210c4a68..869210c4a68 100644 --- a/tests/run-make/compiler-builtins/Cargo.toml +++ b/tests/run-make-cargo/compiler-builtins/Cargo.toml diff --git a/tests/run-make/compiler-builtins/lib.rs b/tests/run-make-cargo/compiler-builtins/lib.rs index 0c9ac1ac8e4..0c9ac1ac8e4 100644 --- a/tests/run-make/compiler-builtins/lib.rs +++ b/tests/run-make-cargo/compiler-builtins/lib.rs diff --git a/tests/run-make/compiler-builtins/rmake.rs b/tests/run-make-cargo/compiler-builtins/rmake.rs index 10093db2258..10093db2258 100644 --- a/tests/run-make/compiler-builtins/rmake.rs +++ b/tests/run-make-cargo/compiler-builtins/rmake.rs diff --git a/tests/run-make/rustc-crates-on-stable/rmake.rs b/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs index cbc1f24b8c1..cbc1f24b8c1 100644 --- a/tests/run-make/rustc-crates-on-stable/rmake.rs +++ b/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/Cargo.toml index 6962028375b..6962028375b 100644 --- a/tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml +++ b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/Cargo.toml diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/complex.rs index 1cda7e098f4..1cda7e098f4 100644 --- a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs +++ b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/complex.rs diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/tester.rs index fbd1906ec09..fbd1906ec09 100644 --- a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs +++ b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/examples/tester.rs diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/src/lib.rs index a9bb0272c78..a9bb0272c78 100644 --- a/tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs +++ b/tests/run-make-cargo/rustdoc-scrape-examples-paths/foo/src/lib.rs diff --git a/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs b/tests/run-make-cargo/rustdoc-scrape-examples-paths/rmake.rs index 6784e438762..6784e438762 100644 --- a/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs +++ b/tests/run-make-cargo/rustdoc-scrape-examples-paths/rmake.rs diff --git a/tests/run-make/thumb-none-cortex-m/rmake.rs b/tests/run-make-cargo/thumb-none-cortex-m/rmake.rs index 27afef874da..6158b9c36da 100644 --- a/tests/run-make/thumb-none-cortex-m/rmake.rs +++ b/tests/run-make-cargo/thumb-none-cortex-m/rmake.rs @@ -4,7 +4,7 @@ //! //! How to run this //! $ ./x.py clean -//! $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi tests/run-make +//! $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi tests/run-make-cargo //! //! Supported targets: //! - thumbv6m-none-eabi (Bare Cortex-M0, M0+, M1) diff --git a/tests/run-make/thumb-none-qemu/example/.cargo/config.toml b/tests/run-make-cargo/thumb-none-qemu/example/.cargo/config.toml index 7152e81b502..7152e81b502 100644 --- a/tests/run-make/thumb-none-qemu/example/.cargo/config.toml +++ b/tests/run-make-cargo/thumb-none-qemu/example/.cargo/config.toml diff --git a/tests/run-make/thumb-none-qemu/example/Cargo.lock b/tests/run-make-cargo/thumb-none-qemu/example/Cargo.lock index 687b962a8b6..687b962a8b6 100644 --- a/tests/run-make/thumb-none-qemu/example/Cargo.lock +++ b/tests/run-make-cargo/thumb-none-qemu/example/Cargo.lock diff --git a/tests/run-make/thumb-none-qemu/example/Cargo.toml b/tests/run-make-cargo/thumb-none-qemu/example/Cargo.toml index 63eb5f90aec..63eb5f90aec 100644 --- a/tests/run-make/thumb-none-qemu/example/Cargo.toml +++ b/tests/run-make-cargo/thumb-none-qemu/example/Cargo.toml diff --git a/tests/run-make/thumb-none-qemu/example/memory.x b/tests/run-make-cargo/thumb-none-qemu/example/memory.x index dc7ad967a42..dc7ad967a42 100644 --- a/tests/run-make/thumb-none-qemu/example/memory.x +++ b/tests/run-make-cargo/thumb-none-qemu/example/memory.x diff --git a/tests/run-make/thumb-none-qemu/example/src/main.rs b/tests/run-make-cargo/thumb-none-qemu/example/src/main.rs index 4b8162c4120..4b8162c4120 100644 --- a/tests/run-make/thumb-none-qemu/example/src/main.rs +++ b/tests/run-make-cargo/thumb-none-qemu/example/src/main.rs diff --git a/tests/run-make/thumb-none-qemu/rmake.rs b/tests/run-make-cargo/thumb-none-qemu/rmake.rs index 9d4b426f4a1..9d4b426f4a1 100644 --- a/tests/run-make/thumb-none-qemu/rmake.rs +++ b/tests/run-make-cargo/thumb-none-qemu/rmake.rs diff --git a/tests/run-make/uefi-qemu/rmake.rs b/tests/run-make-cargo/uefi-qemu/rmake.rs index 55d42fba5e7..55d42fba5e7 100644 --- a/tests/run-make/uefi-qemu/rmake.rs +++ b/tests/run-make-cargo/uefi-qemu/rmake.rs diff --git a/tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.lock b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.lock index 8b6a664ad93..8b6a664ad93 100644 --- a/tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.lock +++ b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.lock diff --git a/tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.toml b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.toml index 1a8d0d94368..1a8d0d94368 100644 --- a/tests/run-make/uefi-qemu/uefi_qemu_test/Cargo.toml +++ b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/Cargo.toml diff --git a/tests/run-make/uefi-qemu/uefi_qemu_test/src/main.rs b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/src/main.rs index f8e1212a9f6..f8e1212a9f6 100644 --- a/tests/run-make/uefi-qemu/uefi_qemu_test/src/main.rs +++ b/tests/run-make-cargo/uefi-qemu/uefi_qemu_test/src/main.rs diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks index d2e53bee08f..d2e53bee08f 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks index b93b33afb3f..b93b33afb3f 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks index 0a3d1dced42..0a3d1dced42 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_c_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks index f96f152c02f..f96f152c02f 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks index 0126cd8ee64..0126cd8ee64 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cc_plus_one_cxx_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks index 61567548848..61567548848 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks index f551356b2ff..f551356b2ff 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks index 17312b9126a..17312b9126a 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks index 4b66cc5bc83..4b66cc5bc83 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_c_global_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks index 0f403e0203c..0f403e0203c 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks index 222e4ef7983..222e4ef7983 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks index 1d8fc96ad50..1d8fc96ad50 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/cmake_plus_one_cxx_global_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml index 3a97c37e951..3a97c37e951 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/Cargo.toml diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs index f1fb5803948..f1fb5803948 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c index dd76d4f303a..dd76d4f303a 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo.c diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s index 6d56214e87e..6d56214e87e 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_asm.s diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp index ac6f64ac413..ac6f64ac413 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/foo_cxx.cpp diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt index 27cdf2ecf82..27cdf2ecf82 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/CMakeLists.txt diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c index c3b731a2d50..c3b731a2d50 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo.c diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s index 64b6b430eea..64b6b430eea 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_asm.s diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp index 824e2afebcc..824e2afebcc 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/libcmake_foo/src/foo_cxx.cpp diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs index cde38aacf7f..cde38aacf7f 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks index 885bf461bf3..885bf461bf3 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/jumpto.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks index 485e20e3111..485e20e3111 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.with_frame_pointers.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks index e02fe094889..e02fe094889 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/print.without_frame_pointers.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rmake.rs index 89754cdaf90..89754cdaf90 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rmake.rs diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks index fe6777537fb..fe6777537fb 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/rust_plus_one_global_asm.checks diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks index b46cf758384..b46cf758384 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks +++ b/tests/run-make-cargo/x86_64-fortanix-unknown-sgx-lvi/unw_getcontext.checks diff --git a/triagebot.toml b/triagebot.toml index 6924ed4a0d9..77aa549f6aa 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -336,6 +336,7 @@ trigger_files = [ "tests/mir-opt", "tests/pretty", "tests/run-make", + "tests/run-make-cargo", "tests/ui", "tests/ui-fulldeps", ] @@ -593,6 +594,7 @@ trigger_files = [ [autolabel."A-run-make"] trigger_files = [ "tests/run-make", + "tests/run-make-cargo", "src/tools/run-make-support" ] @@ -1543,6 +1545,7 @@ dep-bumps = [ "/src/rustdoc-json-types" = ["rustdoc"] "/src/stage0" = ["bootstrap"] "/tests/run-make" = ["@jieyouxu"] +"/tests/run-make-cargo" = ["@jieyouxu"] "/tests/rustdoc" = ["rustdoc"] "/tests/rustdoc-gui" = ["rustdoc"] "/tests/rustdoc-js-std" = ["rustdoc"] |
