Skip to content

Commit bfe0a08

Browse files
tshepangspastorino
authored andcommitted
run-pass dir is gone (#409)
Fixes #405
1 parent 442aed9 commit bfe0a08

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

src/compiletest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ expect, and more. If you are unfamiliar with the compiler testing framework,
1616
see [this chapter](./tests/intro.html) for additional background.
1717

1818
The tests themselves are typically (but not always) organized into
19-
"suites" – for example, `run-pass`, a folder representing tests that should
20-
succeed, `run-fail`, a folder holding tests that should compile successfully,
19+
"suites" – for example, `run-fail`,
20+
a folder holding tests that should compile successfully,
2121
but return a failure (non-zero status), `compile-fail`, a folder holding tests
2222
that should fail to compile, and many more. The various suites are defined in
2323
[src/tools/compiletest/src/common.rs][common] in the `pub struct Config`

src/how-to-build-and-run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ in other sections:
483483
- Running tests (see the [section on running tests](./tests/running.html) for
484484
more details):
485485
- `./x.py test --stage 1 src/libstd` – runs the `#[test]` tests from libstd
486-
- `./x.py test --stage 1 src/test/run-pass` – runs the `run-pass` test suite
486+
- `./x.py test --stage 1 src/test/ui` – runs the `ui` test suite
487487
- `./x.py test --stage 1 src/test/ui/const-generics` - runs all the tests in
488488
the `const-generics/` subdirectory of the `ui` test suite
489489
- `./x.py test --stage 1 src/test/ui/const-generics/const-types.rs` - runs

src/tests/adding.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,23 @@ rough heuristics:
4343
We have not traditionally had a lot of structure in the names of
4444
tests. Moreover, for a long time, the rustc test runner did not
4545
support subdirectories (it now does), so test suites like
46-
[`src/test/run-pass`] have a huge mess of files in them. This is not
46+
[`src/test/ui`] have a huge mess of files in them. This is not
4747
considered an ideal setup.
4848

49-
[`src/test/run-pass`]: https://github.com/rust-lang/rust/tree/master/src/test/run-pass/
49+
[`src/test/ui`]: https://github.com/rust-lang/rust/tree/master/src/test/ui/
5050

5151
For regression tests – basically, some random snippet of code that
5252
came in from the internet – we often just name the test after the
53-
issue. For example, `src/test/run-pass/issue-12345.rs`. If possible,
53+
issue. For example, `src/test/ui/issue-12345.rs`. If possible,
5454
though, it is better if you can put the test into a directory that
5555
helps identify what piece of code is being tested here (e.g.,
5656
`borrowck/issue-12345.rs` is much better), or perhaps give it a more
5757
meaningful name. Still, **do include the issue number somewhere**.
5858

5959
When writing a new feature, **create a subdirectory to store your
6060
tests**. For example, if you are implementing RFC 1234 ("Widgets"),
61-
then it might make sense to put the tests in directories like:
62-
63-
- `src/test/ui/rfc1234-widgets/`
64-
- `src/test/run-pass/rfc1234-widgets/`
65-
- etc
61+
then it might make sense to put the tests in a directory like
62+
`src/test/ui/rfc1234-widgets/`.
6663

6764
In other cases, there may already be a suitable directory. (The proper
6865
directory structure to use is actually an area of active debate.)
@@ -216,7 +213,7 @@ The error levels that you can have are:
216213
## Revisions
217214

218215
Certain classes of tests support "revisions" (as of the time of this
219-
writing, this includes run-pass, compile-fail, run-fail, and
216+
writing, this includes compile-fail, run-fail, and
220217
incremental, though incremental tests are somewhat
221218
different). Revisions allow a single test file to be used for multiple
222219
tests. This is done by adding a special header at the top of the file:

src/tests/running.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ test" that can be used after modifying rustc to see if things are
3434
generally working correctly would be the following:
3535

3636
```bash
37-
> ./x.py test --stage 1 src/test/{ui,compile-fail,run-pass}
37+
> ./x.py test --stage 1 src/test/{ui,compile-fail}
3838
```
3939

40-
This will run the `ui`, `compile-fail`, and `run-pass` test suites,
40+
This will run the `ui` and `compile-fail` test suites,
4141
and only with the stage 1 build. Of course, the choice of test suites
4242
is somewhat arbitrary, and may not suit the task you are doing. For
4343
example, if you are hacking on debuginfo, you may be better off with
@@ -114,10 +114,10 @@ Pass UI tests now have three modes, `check-pass`, `build-pass` and
114114
`run-pass`. When `--pass $mode` is passed, these tests will be forced
115115
to run under the given `$mode` unless the directive `// ignore-pass`
116116
exists in the test file. For example, you can run all the tests in
117-
`src/test/run-pass` as `check-pass`:
117+
`src/test/ui` as `check-pass`:
118118

119119
```bash
120-
> ./x.py test --stage 1 src/test/run-pass --pass check
120+
> ./x.py test --stage 1 src/test/ui --pass check
121121
```
122122

123123
By passing `--pass $mode`, you can reduce the testing time. For each

0 commit comments

Comments
 (0)