Skip to content

Commit 692f81f

Browse files
JohnTitormark-i-m
authored andcommitted
Move bless section to running chapter
1 parent fa6c80d commit 692f81f

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

src/tests/adding.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ source.
150150
compares against `.fixed` (they must match). Finally, the fixed
151151
source is compiled, and this compilation is required to succeed.
152152
The `.fixed` file can also be generated automatically with the
153-
`--bless` option, discussed [below](#bless).
153+
`--bless` option, discribed in [this section][bless].
154154
* `min-gdb-version` specifies the minimum gdb version required for
155155
this test; see also `ignore-gdb-version`
156156
* `min-lldb-version` specifies the minimum lldb version required for
@@ -185,6 +185,7 @@ source.
185185
have a gate test.
186186

187187
[`header.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/header.rs
188+
[bless]: ./running.md#editing-and-updating-the-reference-files
188189

189190
<a name="error_annotations"></a>
190191

@@ -284,22 +285,6 @@ you can even run the resulting program. Just add one of the following
284285
- `// run-pass` – compilation should succeed and we should run the
285286
resulting binary
286287

287-
<a name="bless"></a>
288-
289-
### Editing and updating the reference files
290-
291-
If you have changed the compiler's output intentionally, or you are
292-
making a new test, you can pass `--bless` to the test subcommand. E.g.
293-
if some tests in `src/test/ui` are failing, you can run
294-
295-
```text
296-
./x.py test --stage 1 src/test/ui --bless
297-
```
298-
299-
to automatically adjust the `.stderr`, `.stdout` or `.fixed` files of
300-
all tests. Of course you can also target just specific tests with the
301-
`--test-args your_test_name` flag, just like when running the tests.
302-
303288
### Normalization
304289

305290
The normalization applied is aimed at eliminating output difference

src/tests/running.md

+14
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ Under the hood, the test runner invokes the standard rust test runner
108108
filtering for tests that include "issue-1234" in the name. (Thus
109109
`--test-args` is a good way to run a collection of related tests.)
110110

111+
## Editing and updating the reference files
112+
113+
If you have changed the compiler's output intentionally, or you are
114+
making a new test, you can pass `--bless` to the test subcommand. E.g.
115+
if some tests in `src/test/ui` are failing, you can run
116+
117+
```text
118+
./x.py test --stage 1 src/test/ui --bless
119+
```
120+
121+
to automatically adjust the `.stderr`, `.stdout` or `.fixed` files of
122+
all tests. Of course you can also target just specific tests with the
123+
`--test-args your_test_name` flag, just like when running the tests.
124+
111125
## Passing `--pass $mode`
112126

113127
Pass UI tests now have three modes, `check-pass`, `build-pass` and

0 commit comments

Comments
 (0)