Skip to content

Commit 0ba744a

Browse files
Rollup merge of #155474 - Zalathar:bpass, r=jieyouxu
Rename incremental `cfail`/`cpass` revisions to `bfail`/`bpass` Long ago, UI tests were divided into *compile* and *run* tests. Later, the compile tests were further subdivided into *check* and *build* tests, to speed up tests that don't need a full build. The same split was never applied to incremental test revisions, so the only way to perform a check build in incremental tests is (confusingly) to use a `cfail` revision and then specify `//@ check-fail` or `//@ check-pass`. This PR makes room for dedicated check-fail and check-pass revisions by renaming the existing `cfail` and `cpass` revisions to `bfail` and `bpass`, since they currently perform a full build. --- The test updates were done with a regex whole-word find-and-replace for `c(fail|pass)(\d*)`, and I also took the opportunity to manually add a space after `revisions:` on affected lines. r? jieyouxu
2 parents 7af0c29 + 982e87d commit 0ba744a

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/tests/compiletest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ then runs the compiler for each revision, reusing the incremental results from p
158158

159159
The revisions should start with:
160160

161-
* `cfail` — the test should fail to compile
162-
* `cpass` — the test should compile successully
161+
* `bfail` — the test should fail to compile
162+
* `bpass` — the test should compile successully
163163
* `rpass` — the test should compile and run successfully
164164

165165
To make the revisions unique, you should add a suffix like `rpass1` and `rpass2`.
@@ -185,7 +185,7 @@ fn foo() {
185185
fn main() { foo(); }
186186
```
187187

188-
`cfail` tests support the `forbid-output` directive to specify that a certain
188+
Incremental tests support the `forbid-output` directive to specify that a certain
189189
substring must not appear anywhere in the compiler output.
190190
This can be useful to ensure certain errors do not appear, but this can be fragile as error messages
191191
change over time, and a test may no longer be checking the right thing but will still pass.

src/tests/directives.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ comparison](ui.md#output-comparison) and [Rustfix tests](ui.md#rustfix-tests) fo
106106
| `exec-env` | Env var to set when executing a test | `ui`, `crashes` | `<KEY>=<VALUE>` |
107107
| `unset-exec-env` | Env var to unset when executing a test | `ui`, `crashes` | Any env var name |
108108
| `stderr-per-bitwidth` | Generate a stderr snapshot for each bitwidth | `ui` | N/A |
109-
| `forbid-output` | A pattern which must not appear in stderr/`cfail` output | `ui`, `incremental` | Regex pattern |
109+
| `forbid-output` | Check that compile/run output does not contain a specific string | `ui`, `incremental` | String |
110110
| `run-flags` | Flags passed to the test executable | `ui` | Arbitrary flags |
111111
| `known-bug` | No error annotation needed due to known bug | `ui`, `crashes`, `incremental` | Issue number `#123456` |
112112
| `compare-output-by-lines` | Compare the output by lines, rather than as a single string | All | N/A |
@@ -315,8 +315,7 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests).
315315

316316
- `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
317317
- [`revisions`](compiletest.md#revisions) — compile multiple times
318-
-[`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects
319-
output pattern
318+
- [`forbid-output`](compiletest.md#incremental-tests) — check that output does not contain a specified string
320319
- [`reference`] — an annotation linking to a rule in the reference
321320
- `disable-gdb-pretty-printers` — disable gdb pretty printers for debuginfo tests
322321

0 commit comments

Comments
 (0)