From 0b4e0b82a9e8f771ea1aee768fbd5842ad006fab Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Tue, 13 Feb 2018 22:33:42 +0100 Subject: [PATCH] Explain how to execute a single UI test --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5dcec216..61e5cd679 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,6 +74,18 @@ Therefore you can simply run `tests/ui/update-all-references.sh` (after running `cargo test`) and check whether the output looks as you expect with `git diff`. Commit all `*.stderr` files, too. +If you don't want to wait for all tests to finish, you can also execute a single test file by using `TESTNAME` to specify the test to run: + +```bash +TESTNAME=ui/empty_line_after_outer_attr cargo test --test compile-test +``` + +And you can also combine this with `CARGO_INCREMENTAL`: + +```bash +CARGO_INCREMENTAL=1 TESTNAME=ui/doc cargo test --test compile-test +``` + ### Testing manually Manually testing against an example file is useful if you have added some