about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/empty.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-23 17:16:22 +0000
committerbors <bors@rust-lang.org>2019-06-23 17:16:22 +0000
commit2cd5ed495ceb6224a091c2310ff90c91dd9afbd9 (patch)
treed5f8cb9d593da33e7079028fc4ec691b4a8eb2fb /src/test/rustdoc-ui/coverage/empty.rs
parent5d677b2efdb00031564d30ee9f63f4d4f936a39f (diff)
parent0886bc4cbf3ec9b782b2dc9ed99ac6bed9df7b00 (diff)
downloadrust-2cd5ed495ceb6224a091c2310ff90c91dd9afbd9.tar.gz
rust-2cd5ed495ceb6224a091c2310ff90c91dd9afbd9.zip
Auto merge of #61778 - petrochenkov:pass, r=Mark-Simulacrum
compiletest: Introduce `// {check,build,run}-pass` pass modes

Pass UI tests now have three modes
```
// check-pass
// build-pass
// run-pass
```
mirroring equivalent well-known `cargo` commands.

`// check-pass` will compile the test skipping codegen (which is expensive and isn't supposed to fail in most cases).
`// build-pass` will compile and link the test without running it.
`// run-pass` will compile, link and run the test.
Tests without a "pass" annotation are still considered "fail" tests.

Most UI tests would probably want to switch to `check-pass`.
Tests validating codegen would probably want to run the generated code as well and use `run-pass`.
`build-pass` should probably be rare (linking tests?).

https://github.com/rust-lang/rust/pull/61755 will provide a way to run the tests with any mode, e.g. bump `check-pass` tests to `run-pass` to satisfy especially suspicious people, and be able to make sure that codegen doesn't breaks in some entirely unexpected way.
Tests marked with any mode are expected to pass with any other mode, if that's not the case for some legitimate reason, then the test should be made a "fail" test rather than a "pass" test.
Perhaps some secondary CI can verify this invariant, but that's not super urgent.

`// compile-pass` still works and is equivalent to `build-pass`.
Why is `// compile-pass` bad - 1) it gives an impression that the test is only compiled, but not linked, 2) it doesn't mirror a cargo command.
It can be removed some time in the future in a separate PR.

cc https://github.com/rust-lang/rust/issues/61712
Diffstat (limited to 'src/test/rustdoc-ui/coverage/empty.rs')
0 files changed, 0 insertions, 0 deletions