Skip to content
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

Mention incremental compilation in testing chapter #199

Merged
merged 1 commit into from Sep 11, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+21 −1
Diff settings

Always

Just for now

Copy path View file
@@ -59,7 +59,27 @@ Under the hood, the test runner invokes the standard rust test runner
(the same one you get with `#[test]`), so this command would wind up
filtering for tests that include "issue-1234" in the name.

Often, though, it's easier to just run the test by hand. Most tests are
## Using incremental compilation

You can further enable the `--incremental` flag to save additional time in subsequent rebuilds:

```bash
> ./x.py test --stage 1 src/test/ui --incremental --test-args issue-1234
```

If you don't want to include the flag with every command, you can enable it in the `config.toml`, too:

```toml
# Whether to always use incremental compilation when building rustc
incremental = true
```

Note that incremental compilation will use more disk space than usual. If disk space is a
concern for you, you might want to check the size of the `build` directory from time to time.

## Running tests manually

Sometimes it's easier and faster to just run the test by hand. Most tests are
just `rs` files, so you can do something like

```bash
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.