You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzol
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites
## Summary
Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`.
| New test suites | Explanation |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. |
| `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. |
This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](rust-lang/compiler-team#847).
Fixesrust-lang/rust#135573 (for the tests that do not need in-tree `cargo`).
Fixesrust-lang/rust#134109.
## Remarks
- I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability.
- The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see rust-lang/rust#130642).
---
try-job: aarch64-msvc-1
try-job: test-various
try-job: x86_64-gnu-debug
try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: dist-various-1
|`aux-bin`| Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`| Path to auxiliary `.rs` file |
58
-
|`aux-build`| Build a separate crate from the named source file | All except `run-make`| Path to auxiliary `.rs` file |
59
-
|`aux-crate`| Like `aux-build` but makes available as extern prelude | All except `run-make`|`<extern_prelude_name>=<path/to/aux/file.rs>`|
60
-
|`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 |
61
-
|`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 |
62
-
|`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 |
55
+
| 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 |
58
+
|`aux-build`| Build a separate crate from the named source file | All except `run-make`/`run-make-cargo`| Path to auxiliary `.rs` file |
59
+
|`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>`|
60
+
|`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 |
61
+
|`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 |
62
+
|`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 |
63
63
64
64
[^pm]: please see the [Auxiliary proc-macro section](compiletest.html#auxiliary-proc-macro) in the compiletest chapter for specifics.
65
65
@@ -243,18 +243,18 @@ ignoring debuggers.
243
243
244
244
### Affecting how tests are built
245
245
246
-
| 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`|
249
-
|`edition`| The edition used to build the test | All except for `run-make`| Any valid `--edition` value |
250
-
|`rustc-env`| Env var to set when running `rustc`| All except for `run-make`|`<KEY>=<VALUE>`|
251
-
|`unset-rustc-env`| Env var to unset when running `rustc`| All except for `run-make`| Any env var name |
252
-
|`incremental`| Proper incremental support for tests outside of incremental test suite |`ui`, `crashes`| N/A |
253
-
|`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 |
246
+
| 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`|
249
+
|`edition`| The edition used to build the test | All except for `run-make`/`run-make-cargo`| Any valid `--edition` value |
250
+
|`rustc-env`| Env var to set when running `rustc`| All except for `run-make`/`run-make-cargo`|`<KEY>=<VALUE>`|
251
+
|`unset-rustc-env`| Env var to unset when running `rustc`| All except for `run-make`/`run-make-cargo`| Any env var name |
252
+
|`incremental`| Proper incremental support for tests outside of incremental test suite |`ui`, `crashes`| N/A |
253
+
|`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 |
254
254
255
255
<divclass="warning">
256
256
257
-
Tests (outside of `run-make`) that want to use incremental tests not in the
257
+
Tests (outside of `run-make`/`run-make-cargo`) that want to use incremental tests not in the
258
258
incremental test-suite must not pass `-C incremental` via `compile-flags`, and
259
259
must instead use the `//@ incremental` directive.
260
260
@@ -264,9 +264,9 @@ Consider writing the test as a proper incremental test instead.
264
264
265
265
### Rustdoc
266
266
267
-
| Directive | Explanation | Supported test suites | Possible values |
0 commit comments