Support multiple revisions in compiletest#66524
Conversation
src/tools/compiletest/src/errors.rs
Outdated
There was a problem hiding this comment.
@BurntSushi Have you considered providing a method for the 0th-always-OK group to make things clearer and avoid the .unwrap() in client code? Would have been helpful during review.
There was a problem hiding this comment.
Haven't considered it, but it's not a bad idea! Thanks.
|
@bors r+ |
|
📌 Commit fd49547d03a0277818495f4028475d425abe4fe0 has been approved by |
|
☔ The latest upstream changes (presumably #66578) made this pull request unmergeable. Please resolve the merge conflicts. |
The `//[X]~` syntax filters errors for tests that are run across multiple cfgs with `// revisions:`. This commit extends that syntax to accept `//[X,Y]~`, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments, `//[X]~` and `//[Y]~`, but can fit on a single line.
This test does not actually emit any warnings, since `#![allow(warnings)]` was specified. `compiletest` was erroneously ignoring `//~` tests and looking only for `//[X]~` ones. As a result of the changes in the previous commit, we now look for `//~` comments in incremental tests and expect them to appear in *all* revisions.
fd49547 to
ae22938
Compare
|
@bors r=Centril |
|
📌 Commit c537f22 has been approved by |
… r=Centril Support multiple revisions in `compiletest` The `//[X]~` syntax filters errors for tests that are run across multiple cfgs with `// revisions:`. This commit extends that syntax to accept `//[X,Y]~`, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments, `//[X]~` and `//[Y]~`, but can fit on a single line. While refactoring `compiletest` to support this, I also uncovered a small bug that was causing an incremental test to always pass, despite no errors being emitted. r? @Centril
|
☀️ Test successful - checks-azure |
|
📣 Toolstate changed by #66524! Tested on commit bd816fd. 💔 rustc-guide on linux: test-pass → test-fail (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra). |
Tested on commit rust-lang/rust@bd816fd. Direct link to PR: <rust-lang/rust#66524> 💔 rustc-guide on linux: test-pass → test-fail (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra).
The
//[X]~syntax filters errors for tests that are run across multiple cfgs with// revisions:. This commit extends that syntax to accept//[X,Y]~, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments,//[X]~and//[Y]~, but can fit on a single line.While refactoring
compiletestto support this, I also uncovered a small bug that was causing an incremental test to always pass, despite no errors being emitted.r? @Centril