diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-02-21 13:36:45 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-02-28 16:44:04 +0100 |
| commit | 4af94f842d37c15a0428e50c10fc2293f3b7a9a5 (patch) | |
| tree | 28a9ab359b52b3ff73ba0ec5d7af29e1f60015c9 | |
| parent | 807f6ffa91268f72f738b2b1776a19e8a0a025f0 (diff) | |
| download | rust-4af94f842d37c15a0428e50c10fc2293f3b7a9a5.tar.gz rust-4af94f842d37c15a0428e50c10fc2293f3b7a9a5.zip | |
Implement `RunMake` test suite using the `test!` macro
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index efdac694aee..79be42cdd2f 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1381,40 +1381,7 @@ test!(Pretty { only_hosts: true, }); -/// Special-handling is needed for `run-make`, so don't use `test!` for defining `RunMake` -/// tests. -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct RunMake { - pub compiler: Compiler, - pub target: TargetSelection, -} - -impl Step for RunMake { - type Output = (); - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = false; - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.suite_path("tests/run-make") - } - - fn make_run(run: RunConfig<'_>) { - let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple()); - run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() }); - run.builder.ensure(RunMake { compiler, target: run.target }); - } - - fn run(self, builder: &Builder<'_>) { - builder.ensure(Compiletest { - compiler: self.compiler, - target: self.target, - mode: "run-make", - suite: "run-make", - path: "tests/run-make", - compare_mode: None, - }); - } -} +test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true }); test!(Assembly { path: "tests/assembly", mode: "assembly", suite: "assembly", default: true }); @@ -1657,6 +1624,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the host: target, }); } + if suite == "run-make" { + builder.tool_exe(Tool::RunMakeSupport); + } // Also provide `rust_test_helpers` for the host. builder.ensure(TestHelpers { target: compiler.host }); |
