Skip to content

Commit 84c2cd5

Browse files
committed
added compiletest to summary.md; linked to existing resources for additional information
1 parent fc83b6f commit 84c2cd5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [About this guide](./about-this-guide.md)
44
- [How to build the compiler and run what you built](./how-to-build-and-run.md)
5+
- [Using `compiletest` + commands to control test execution](./compiletest.md)
56
- [Using the compiler testing framework](./running-tests.md)
67
- [How to add new header commands to `compiletest`](./compiletest.md)
78
- [Walkthrough: a typical contribution](./walkthrough.md)

src/compiletest.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ configure behavior and expected results of both individual and groups of tests.
66

77
`compiletest` tests may check test code for success, for failure or in some cases, even failure to compile. Tests are
88
typically organized as a Rust source file with annotations in comments before and/or within the test code, which serve to
9-
direct `compiletest` on if or how to run the test, what behavior to expect, and more.
9+
direct `compiletest` on if or how to run the test, what behavior to expect, and more. If you are unfamiliar with the compiler
10+
testing framework, see [`this chapter`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/intro.md) for additional background.
1011

1112
The tests themselves are typically (but not always) organized into "suites"--for example, `run-pass`, a folder
1213
representing tests that should succeed, `run-fail`, a folder holding tests that should compile successfully, but return
@@ -16,8 +17,9 @@ introduction to the different suites of compiler tests along with details about
1617
[here, at Brian Anderson's blog](https://brson.github.io/2017/07/10/how-rust-is-tested#s-ct).
1718

1819
## Adding a new test file
19-
Simply create your new test in the appropriate location under [src/test](https://github.com/rust-lang/rust/tree/master/src/test). No registration of test files is necessary as
20+
Briefly, simply create your new test in the appropriate location under [src/test](https://github.com/rust-lang/rust/tree/master/src/test). No registration of test files is necessary as
2021
`compiletest` will scan the [src/test](https://github.com/rust-lang/rust/tree/master/src/test) subfolder recursively, and will execute any Rust source files it finds as tests.
22+
See [`Adding new tests`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/adding.md) for a complete guide on how to adding new tests.
2123

2224
## Header Commands
2325
Source file annotations which appear in comments near the top of the source file *before* any test code are known as header

0 commit comments

Comments
 (0)