Skip to content

clarify run-rustfix compiletest header #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/tests/adding.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,14 @@ exhaustive. Header commands can generally be found by browsing the
source.

* `run-rustfix` for UI tests, indicates that the test produces
structured suggestions, which are then applied and the final
source is stored in a `.fixed` file and compiled again. The final
compilation is required to succeed.
structured suggestions. The test writer should create a `.fixed`
file, which contains the source with the suggestions applied.
When the test is run, compiletest first checks that the correct
lint/warning is generated. Then, it applies the suggestion and
compares against `.fixed` (they must match). Finally, the fixed
source is compiled, and this compilation is required to succeed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably mention that you can run ./x.py test --bless to generate this file

The `.fixed` file can also be generated automatically with the
`--bless` option, discussed [below](#bless).
* `min-{gdb,lldb}-version`
* `min-llvm-version`
* `compile-pass` for UI tests, indicates that the test is
Expand Down Expand Up @@ -267,6 +272,8 @@ you can even run the resulting program. Just add one of the following
- `// run-pass` -- compilation should succeed and we should run the
resulting binary

<a name="bless"></a>

### Editing and updating the reference files

If you have changed the compiler's output intentionally, or you are
Expand Down