about summary refs log tree commit diff
path: root/tests/coverage/README.md
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-11-01 21:07:07 +1100
committerZalathar <Zalathar@users.noreply.github.com>2023-11-07 11:15:19 +1100
commit4e6f438d2ace2f5297cea2d3e331c6dccd4e18c2 (patch)
treecde84dceff57365224b5d164bdd16589f02e1df4 /tests/coverage/README.md
parent49127c64d6998526d9f723a653312d0cf5310454 (diff)
downloadrust-4e6f438d2ace2f5297cea2d3e331c6dccd4e18c2.tar.gz
rust-4e6f438d2ace2f5297cea2d3e331c6dccd4e18c2.zip
coverage: Register `test::Coverage` as the test suite for `tests/coverage`
This restores the ability to run a coverage test by specifying its path, e.g.
`./x.py test tests/coverage/if.rs`. This runs the test in both modes.
Diffstat (limited to 'tests/coverage/README.md')
-rw-r--r--tests/coverage/README.md17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/coverage/README.md b/tests/coverage/README.md
index 146fbff5b20..f1e403c65e3 100644
--- a/tests/coverage/README.md
+++ b/tests/coverage/README.md
@@ -1,13 +1,16 @@
-Many of these tests were copied from `tests/run-coverage` in order to
-capture the current behavior of the instrumentor on non-trivial programs.
-The actual mappings have not been closely inspected.
+The tests in this directory are shared by two different test modes, and can be
+run in multiple different ways:
+
+- `./x.py test coverage-map` (compiles to LLVM IR and checks coverage mappings)
+- `./x.py test run-coverage` (runs a test binary and checks its coverage report)
+- `./x.py test coverage` (runs both `coverage-map` and `run-coverage`)
 
 ## Maintenance note
 
 These tests can be sensitive to small changes in MIR spans or MIR control flow,
 especially in HIR-to-MIR lowering or MIR optimizations.
 
-If you haven't touched the coverage code directly, and the `run-coverage` test
-suite still works, then it should usually be OK to just `--bless` these
-coverage mapping tests as necessary, without worrying too much about the exact
-changes.
+If you haven't touched the coverage code directly, and the tests still pass in
+`run-coverage` mode, then it should usually be OK to just re-bless the mappings
+as necessary with `./x.py test coverage-map --bless`, without worrying too much
+about the exact changes.