os-rust/tests/coverage
Matthias Krüger e696f5c180
Rollup merge of #134323 - Zalathar:dismantle-map-data, r=jieyouxu
coverage: Dismantle `map_data.rs` by moving its responsibilities elsewhere

This is a series of incremental changes that combine to let us get rid of `coverageinfo/map_data.rs`, by moving all of its responsibilities into more appropriate places.

Some of the notable consequences are:

- We once again build the per-CGU file table on the fly while preparing individual covfun records, instead of building the whole table up-front. The up-front approach was introduced by #117042 to work around various other problems in generating the covmap/covfun records, but subsequent cleanups have made that approach no longer necessary.
- Expression conversion and mapping-region conversion are now performed directly in `mapgen::covfun`, which should make future changes easier.
- We no longer insert unused function instances into the same map that is also used to track used function instances. This helps to decouple the handling of used vs unused functions.

---

There should be no meaningful change to compiler output. The file table is no longer sorted, because reordering it would invalidate the file indices stored in individual covfun records, but the table order should still be deterministic (albeit arbitrary).

There are some subsequent cleanups that I intend to investigate, but this is enough change for one PR.
2024-12-17 22:34:42 +01:00
..
attr Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
auxiliary Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
branch Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
condition Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
mcdc Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
abort.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
abort.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
abort.rs Remove c_unwind from tests and fix tests 2024-06-19 13:54:55 +01:00
assert-ne.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
assert-ne.coverage coverage: Add tests/coverage/assert-ne.rs 2024-06-12 22:38:16 +10:00
assert-ne.rs coverage: Add tests/coverage/assert-ne.rs 2024-06-12 22:38:16 +10:00
assert.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
assert.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
assert.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
assert_not.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
assert_not.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
assert_not.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
async.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async2.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async2.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async2.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async_block.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async_block.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async_block.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
async_closure.cov-map Stabilize async closures 2024-12-13 00:04:56 +00:00
async_closure.coverage Stabilize async closures 2024-12-13 00:04:56 +00:00
async_closure.rs Stabilize async closures 2024-12-13 00:04:56 +00:00
await_ready.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
await_ready.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
await_ready.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
bad_counter_ids.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
bad_counter_ids.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
bad_counter_ids.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
bench.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
bench.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
bench.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
closure.cov-map comment out the old tests instead of adjusting them 2024-11-25 20:39:45 +01:00
closure.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
closure_bug.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure_bug.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure_bug.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
closure_macro.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
closure_macro.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
closure_macro.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
closure_macro_async.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
closure_macro_async.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
closure_macro_async.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
closure_unit_return.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
closure_unit_return.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
closure_unit_return.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
color.coverage Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
color.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
conditions.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
conditions.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
conditions.rs coverage: Tweak individual tests to be unaffected by rustfmt 2024-01-16 16:14:27 +11:00
continue.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
continue.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
continue.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
coroutine.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
coroutine.coverage Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00
coroutine.rs Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00
coverage_attr_closure.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
coverage_attr_closure.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
coverage_attr_closure.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
dead_code.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
dead_code.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
dead_code.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
drop_trait.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
drop_trait.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
drop_trait.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
fn_sig_into_try.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
fn_sig_into_try.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
fn_sig_into_try.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
generics.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
generics.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
generics.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
holes.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
holes.coverage coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
holes.rs coverage: Test for handling of nested item spans 2024-07-08 20:24:15 +10:00
if.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
if.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
if.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
if_else.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
if_else.coverage coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
if_else.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
if_not.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
if_not.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
if_not.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
ignore_map.coverage Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
ignore_map.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
ignore_run.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
ignore_run.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
inline-dead.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
inline-dead.coverage Tweak various coverage test files for slightly nicer formatting 2024-05-29 14:34:11 +10:00
inline-dead.rs Tweak various coverage test files for slightly nicer formatting 2024-05-29 14:34:11 +10:00
inline.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
inline.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
inline.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
inline_mixed.rs coverage: Regression test for inlining into an uninstrumented crate 2024-11-02 23:20:14 +11:00
inner_items.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
inner_items.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
inner_items.rs Tweak various coverage test files for slightly nicer formatting 2024-05-29 14:34:11 +10:00
issue-83601.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-83601.coverage coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
issue-83601.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
issue-84561.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
issue-84561.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-84561.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-85461.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-85461.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-85461.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-93054.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-93054.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-93054.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
lazy_boolean.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
lazy_boolean.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
lazy_boolean.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
let_else_loop.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
let_else_loop.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
let_else_loop.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
long_and_wide.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
long_and_wide.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
long_and_wide.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
loop-break.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
loop-break.coverage coverage: Replace the old span refiner with a single function 2024-06-12 22:59:24 +10:00
loop-break.rs coverage: Add tests/coverage/loop-break.rs 2024-06-12 22:48:11 +10:00
loop_break_value.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
loop_break_value.coverage coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
loop_break_value.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
loops_branches.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
loops_branches.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
loops_branches.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
macro_in_closure.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
macro_in_closure.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
macro_in_closure.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
macro_name_span.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
macro_name_span.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
macro_name_span.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
match_or_pattern.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
match_or_pattern.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
match_or_pattern.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
nested_loops.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
nested_loops.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
nested_loops.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
no-core.cov-map Coverage test for allowing coverage in a #![no_core] crate 2024-11-24 21:12:40 +11:00
no-core.coverage Coverage test for allowing coverage in a #![no_core] crate 2024-11-24 21:12:40 +11:00
no-core.rs Coverage test for allowing coverage in a #![no_core] crate 2024-11-24 21:12:40 +11:00
no_cov_crate.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_cov_crate.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_cov_crate.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_spans.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_spans.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_spans.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
no_spans_if_not.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
no_spans_if_not.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
no_spans_if_not.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
overflow.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
overflow.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
overflow.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
panic_unwind.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
panic_unwind.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
panic_unwind.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
partial_eq.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
partial_eq.coverage Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00
partial_eq.rs Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00
README.md coverage: Rename the run-coverage test mode to coverage-run 2023-11-08 16:41:24 +11:00
simple_loop.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_loop.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_loop.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
simple_match.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
simple_match.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_match.rs coverage: Add #[rustfmt::skip] to tests with non-standard formatting 2024-01-16 15:56:37 +11:00
sort_groups.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
sort_groups.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
sort_groups.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
test_harness.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
test_harness.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
test_harness.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
tight_inf_loop.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
tight_inf_loop.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
tight_inf_loop.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
trivial.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
trivial.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
trivial.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
try_error_result.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
try_error_result.coverage Tweak various coverage test files for slightly nicer formatting 2024-05-29 14:34:11 +10:00
try_error_result.rs Tweak various coverage test files for slightly nicer formatting 2024-05-29 14:34:11 +10:00
unicode.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
unicode.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
unicode.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
unreachable.cov-map Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
unreachable.coverage Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
unreachable.rs Stabilize #[coverage] attribute 2024-12-16 21:07:06 -05:00
unused.cov-map coverage: Add an extra "transcribe" step after counter creation 2024-12-04 17:50:52 +11:00
unused.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
unused.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
unused_mod.cov-map coverage: Build the global file table on the fly 2024-12-17 13:55:19 +11:00
unused_mod.coverage coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
unused_mod.rs coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
uses_crate.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
uses_crate.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_crate.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
uses_inline_crate.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_inline_crate.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_inline_crate.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
while.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
while.coverage coverage: Tweak individual tests to be unaffected by rustfmt 2024-01-16 16:14:27 +11:00
while.rs coverage: Tweak individual tests to be unaffected by rustfmt 2024-01-16 16:14:27 +11:00
while_early_ret.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
while_early_ret.coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
while_early_ret.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
yield.cov-map coverage: Prefer to visit nodes whose predecessors have been visited 2024-12-07 12:13:12 +11:00
yield.coverage Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00
yield.rs Manually run x fmt on all source files in tests/coverage/ 2024-05-29 14:34:17 +10:00

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 coverage-run (runs a test binary and checks its coverage report)
  • ./x.py test coverage (runs both coverage-map and coverage-run)

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 tests still pass in coverage-run 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.