Skip to content

Commit 37f5f85

Browse files
authored
Merge pull request #142 from rust-lang-nursery/oli-obk-patch-1
Fixes #141
2 parents dbac00d + 2d38735 commit 37f5f85

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/tests/adding.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ exhaustive. Header commands can generally be found by browsing the
148148
`TestProps` structure found in [`header.rs`] from the compiletest
149149
source.
150150

151+
* `run-rustfix` for UI tests, indicates that the test produces
152+
structured suggestions, which are then applied and the final
153+
source is stored in a `.fixed` file and compiled again. The final
154+
compilation is required to succeed.
151155
* `min-{gdb,lldb}-version`
152156
* `min-llvm-version`
153157
* `compile-pass` for UI tests, indicates that the test is
@@ -266,13 +270,16 @@ you can even run the resulting program. Just add one of the following
266270
### Editing and updating the reference files
267271

268272
If you have changed the compiler's output intentionally, or you are
269-
making a new test, you can use the script `ui/update-references.sh` to
270-
update the references. When you run the test framework, it will report
271-
various errors: in those errors is a command you can use to run the
272-
`ui/update-references.sh` script, which will then copy over the files
273-
from the build directory and use them as the new reference. You can
274-
also just run `ui/update-all-references.sh`. In both cases, you can run
275-
the script with `--help` to get a help message.
273+
making a new test, you can pass `--bless` to the test subcommand. E.g.
274+
if some tests in `src/test/ui` are failing, you can run
275+
276+
```text
277+
./x.py test --stage 1 src/test/ui --bless
278+
```
279+
280+
to automatically adjust the `.stderr`, `.stdout` or `.fixed` files of
281+
all tests. Of course you can also target just specific tests with the
282+
`--test-args your_test_name` flag, just like when running the tests.
276283

277284
### Normalization
278285

0 commit comments

Comments
 (0)