Skip to content

Commit ec0d134

Browse files
Change src/test to tests (#1547)
1 parent e799c10 commit ec0d134

20 files changed

+110
-110
lines changed

src/appendix/humorust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
What's a project without a sense of humor? And frankly some of these are
44
enlightening?
55

6-
- [Weird exprs test](https://github.com/rust-lang/rust/blob/master/src/test/ui/weird-exprs.rs)
6+
- [Weird exprs test](https://github.com/rust-lang/rust/blob/master/tests/ui/weird-exprs.rs)
77
- [Ferris Rap](http://fitzgeraldnick.com/2018/12/13/rust-raps.html)
88
- [The Genesis of Generic Germination](https://github.com/rust-lang/rust/pull/53645#issue-210543221)
99
- [The Bastion of the Turbofish test](https://github.com/rust-lang/rust/blob/79d8a0fcefa5134db2a94739b1d18daa01fc6e9f/src/test/ui/bastion-of-the-turbofish.rs)

src/asm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ can't know ahead of time whether a function will require a frame/base pointer.
361361

362362
Various tests for inline assembly are available:
363363

364-
- `src/test/assembly/asm`
365-
- `src/test/ui/asm`
366-
- `src/test/codegen/asm-*`
364+
- `tests/assembly/asm`
365+
- `tests/ui/asm`
366+
- `tests/codegen/asm-*`
367367

368368
Every architecture supported by inline assembly must have exhaustive tests in
369-
`src/test/assembly/asm` which test all combinations of register classes and types.
369+
`tests/assembly/asm` which test all combinations of register classes and types.

src/building/bootstrapping.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ Build artifacts include, but are not limited to:
193193
without building `rustc` from source ('build with stage 0, then test the
194194
artifacts'). If you're working on the standard library, this is normally the
195195
test command you want.
196-
- `./x.py test src/test/ui` means to build the stage 1 compiler and run
196+
- `./x.py test tests/ui` means to build the stage 1 compiler and run
197197
`compiletest` on it. If you're working on the compiler, this is normally the
198198
test command you want.
199199

200200
#### Examples of what *not* to do
201201

202-
- `./x.py test --stage 0 src/test/ui` is not useful: it runs tests on the
203-
_beta_ compiler and doesn't build `rustc` from source. Use `test src/test/ui`
202+
- `./x.py test --stage 0 tests/ui` is not useful: it runs tests on the
203+
_beta_ compiler and doesn't build `rustc` from source. Use `test tests/ui`
204204
instead, which builds stage 1 from source.
205205
- `./x.py test --stage 0 compiler/rustc` builds the compiler but runs no tests:
206206
it's running `cargo test -p rustc`, but cargo doesn't understand Rust's
@@ -386,7 +386,7 @@ recompiling all dependencies.
386386
`CARGOFLAGS` will pass arguments to cargo itself (e.g. `--timings`). `CARGOFLAGS_BOOTSTRAP` and
387387
`CARGOFLAGS_NOT_BOOTSTRAP` work analogously to `RUSTFLAGS_BOOTSTRAP`.
388388

389-
`--test-args` will pass arguments through to the test runner. For `src/test/ui`, this is
389+
`--test-args` will pass arguments through to the test runner. For `tests/ui`, this is
390390
compiletest; for unit tests and doctests this is the `libtest` runner. Most test runner accept
391391
`--help`, which you can use to find out the options accepted by the runner.
392392

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ in other sections:
223223
- Running tests (see the [section on running tests](../tests/running.html) for
224224
more details):
225225
- `./x.py test library/std` – runs the unit tests and integration tests from `std`
226-
- `./x.py test src/test/ui` – runs the `ui` test suite
227-
- `./x.py test src/test/ui/const-generics` - runs all the tests in
226+
- `./x.py test tests/ui` – runs the `ui` test suite
227+
- `./x.py test tests/ui/const-generics` - runs all the tests in
228228
the `const-generics/` subdirectory of the `ui` test suite
229-
- `./x.py test src/test/ui/const-generics/const-types.rs` - runs
229+
- `./x.py test tests/ui/const-generics/const-types.rs` - runs
230230
the single test `const-types.rs` from the `ui` test suite
231231

232232
### Cleaning out build directories

src/building/suggested.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ rebuild. That ought to fix the problem.
172172

173173
You can also use `--keep-stage 1` when running tests. Something like this:
174174

175-
- Initial test run: `./x.py test src/test/ui`
176-
- Subsequent test run: `./x.py test src/test/ui --keep-stage 1`
175+
- Initial test run: `./x.py test tests/ui`
176+
- Subsequent test run: `./x.py test tests/ui --keep-stage 1`
177177

178178
## Fine-tuning optimizations
179179

src/compiler-src.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ You can read more about rustdoc in [this chapter][rustdocch].
147147

148148
## Tests
149149

150-
The test suite for all of the above is in [`src/test/`]. You can read more
150+
The test suite for all of the above is in [`tests/`]. You can read more
151151
about the test suite [in this chapter][testsch].
152152

153153
The test harness itself is in [`src/tools/compiletest`].
154154

155155
[testsch]: ./tests/intro.md
156156

157-
[`src/test/`]: https://github.com/rust-lang/rust/tree/master/src/test
157+
[`tests/`]: https://github.com/rust-lang/rust/tree/master/tests
158158
[`src/tools/compiletest`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest
159159

160160
## Build System

src/incrcomp-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ There are various ways to write tests against the dependency graph.
66
The simplest mechanisms are the `#[rustc_if_this_changed]` and
77
`#[rustc_then_this_would_need]` annotations. These are used in ui tests
88
to test whether the expected set of paths exist in the dependency graph.
9-
As an example, see `src/test/ui/dep-graph/dep-graph-caller-callee.rs`.
9+
As an example, see `tests/ui/dep-graph/dep-graph-caller-callee.rs`.
1010

1111
The idea is that you can annotate a test like:
1212

src/llvm-coverage-instrumentation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,15 @@ Expected results for both the `mir-opt` tests and the `coverage*` tests under
297297

298298
```shell
299299
$ ./x.py test mir-opt --bless
300-
$ ./x.py test src/test/run-make-fulldeps/coverage --bless
300+
$ ./x.py test tests/run-make-fulldeps/coverage --bless
301301
```
302302

303-
[mir-opt-test]: https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/instrument_coverage.rs
304-
[coverage-test-samples]: https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/coverage
305-
[`coverage-reports`]: https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/coverage-reports
306-
[`coverage-spanview`]: https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/coverage-spanview
303+
[mir-opt-test]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/instrument_coverage.rs
304+
[coverage-test-samples]: https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps/coverage
305+
[`coverage-reports`]: https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps/coverage-reports
306+
[`coverage-spanview`]: https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps/coverage-spanview
307307
[spanview-debugging]: compiler-debugging.md#viewing-spanview-output
308-
[`coverage-llvmir`]: https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/coverage-llvmir
308+
[`coverage-llvmir`]: https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps/coverage-llvmir
309309

310310
## Implementation Details of the `InstrumentCoverage` MIR Pass
311311

src/mir/optimizations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ optimizes it, and returns the improved MIR.
2828

2929
## Quickstart for adding a new optimization
3030

31-
1. Make a Rust source file in `src/test/mir-opt` that shows the code you want to
31+
1. Make a Rust source file in `tests/mir-opt` that shows the code you want to
3232
optimize. This should be kept simple, so avoid `println!` or other formatting
3333
code if it's not necessary for the optimization. The reason for this is that
3434
`println!`, `format!`, etc. generate a lot of MIR that can make it harder to
3535
understand what the optimization does to the test.
3636

37-
2. Run `./x.py test --bless src/test/mir-opt/<your-test>.rs` to generate a MIR
37+
2. Run `./x.py test --bless tests/mir-opt/<your-test>.rs` to generate a MIR
3838
dump. Read [this README][mir-opt-test-readme] for instructions on how to dump
3939
things.
4040

@@ -51,10 +51,10 @@ optimizes it, and returns the improved MIR.
5151
[`run_optimization_passes()`] function,
5252
3. and then start modifying the copied optimization.
5353

54-
5. Rerun `./x.py test --bless src/test/mir-opt/<your-test>.rs` to regenerate the
54+
5. Rerun `./x.py test --bless tests/mir-opt/<your-test>.rs` to regenerate the
5555
MIR dumps. Look at the diffs to see if they are what you expect.
5656

57-
6. Run `./x.py test src/test/ui` to see if your optimization broke anything.
57+
6. Run `./x.py test tests/ui` to see if your optimization broke anything.
5858

5959
7. If there are issues with your optimization, experiment with it a bit and
6060
repeat steps 5 and 6.
@@ -70,7 +70,7 @@ optimizes it, and returns the improved MIR.
7070
If you have any questions along the way, feel free to ask in
7171
`#t-compiler/wg-mir-opt` on Zulip.
7272

73-
[mir-opt-test-readme]: https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/README.md
73+
[mir-opt-test-readme]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/README.md
7474
[`compiler/rustc_mir_transform/src`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_mir_transform/src
7575
<!--- TODO: Change NoLandingPads. [#1232](https://github.com/rust-lang/rustc-dev-guide/issues/1232) -->
7676
[`no_landing_pads`]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_transform/src/no_landing_pads.rs

src/profile-guided-optimization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ in [run-make tests][rmake-tests] (the relevant tests have `pgo` in their name).
131131
There is also a [codegen test][codegen-test] that checks that some expected
132132
instrumentation artifacts show up in LLVM IR.
133133

134-
[rmake-tests]: https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps
135-
[codegen-test]: https://github.com/rust-lang/rust/blob/master/src/test/codegen/pgo-instrumentation.rs
134+
[rmake-tests]: https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps
135+
[codegen-test]: https://github.com/rust-lang/rust/blob/master/tests/codegen/pgo-instrumentation.rs
136136

137137
## Additional Information
138138

0 commit comments

Comments
 (0)