@@ -148,6 +148,10 @@ exhaustive. Header commands can generally be found by browsing the
148
148
` TestProps ` structure found in [ ` header.rs ` ] from the compiletest
149
149
source.
150
150
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.
151
155
* ` min-{gdb,lldb}-version `
152
156
* ` min-llvm-version `
153
157
* ` 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
266
270
### Editing and updating the reference files
267
271
268
272
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.
276
283
277
284
### Normalization
278
285
0 commit comments