tree: e75ba52946b837d2e832c1e5676011f1f80f997b [path history] [tgz]
  1. attr/
  2. auxiliary/
  3. branch/
  4. condition/
  5. mcdc/
  6. abort.cov-map
  7. abort.coverage
  8. abort.rs
  9. assert-ne.cov-map
  10. assert-ne.coverage
  11. assert-ne.rs
  12. assert.cov-map
  13. assert.coverage
  14. assert.rs
  15. assert_not.cov-map
  16. assert_not.coverage
  17. assert_not.rs
  18. async.cov-map
  19. async.coverage
  20. async.rs
  21. async2.cov-map
  22. async2.coverage
  23. async2.rs
  24. async_block.cov-map
  25. async_block.coverage
  26. async_block.rs
  27. bad_counter_ids.cov-map
  28. bad_counter_ids.coverage
  29. bad_counter_ids.rs
  30. bench.cov-map
  31. bench.coverage
  32. bench.rs
  33. closure.cov-map
  34. closure.coverage
  35. closure.rs
  36. closure_bug.cov-map
  37. closure_bug.coverage
  38. closure_bug.rs
  39. closure_macro.cov-map
  40. closure_macro.coverage
  41. closure_macro.rs
  42. closure_macro_async.cov-map
  43. closure_macro_async.coverage
  44. closure_macro_async.rs
  45. closure_unit_return.cov-map
  46. closure_unit_return.coverage
  47. closure_unit_return.rs
  48. color.coverage
  49. color.rs
  50. conditions.cov-map
  51. conditions.coverage
  52. conditions.rs
  53. continue.cov-map
  54. continue.coverage
  55. continue.rs
  56. coroutine.cov-map
  57. coroutine.coverage
  58. coroutine.rs
  59. coverage_attr_closure.cov-map
  60. coverage_attr_closure.coverage
  61. coverage_attr_closure.rs
  62. dead_code.cov-map
  63. dead_code.coverage
  64. dead_code.rs
  65. drop_trait.cov-map
  66. drop_trait.coverage
  67. drop_trait.rs
  68. fn_sig_into_try.cov-map
  69. fn_sig_into_try.coverage
  70. fn_sig_into_try.rs
  71. generics.cov-map
  72. generics.coverage
  73. generics.rs
  74. holes.cov-map
  75. holes.coverage
  76. holes.rs
  77. if.cov-map
  78. if.coverage
  79. if.rs
  80. if_else.cov-map
  81. if_else.coverage
  82. if_else.rs
  83. if_not.cov-map
  84. if_not.coverage
  85. if_not.rs
  86. ignore_map.coverage
  87. ignore_map.rs
  88. ignore_run.cov-map
  89. ignore_run.rs
  90. inline-dead.cov-map
  91. inline-dead.coverage
  92. inline-dead.rs
  93. inline.cov-map
  94. inline.coverage
  95. inline.rs
  96. inner_items.cov-map
  97. inner_items.coverage
  98. inner_items.rs
  99. issue-83601.cov-map
  100. issue-83601.coverage
  101. issue-83601.rs
  102. issue-84561.cov-map
  103. issue-84561.coverage
  104. issue-84561.rs
  105. issue-85461.cov-map
  106. issue-85461.coverage
  107. issue-85461.rs
  108. issue-93054.cov-map
  109. issue-93054.coverage
  110. issue-93054.rs
  111. lazy_boolean.cov-map
  112. lazy_boolean.coverage
  113. lazy_boolean.rs
  114. let_else_loop.cov-map
  115. let_else_loop.coverage
  116. let_else_loop.rs
  117. long_and_wide.cov-map
  118. long_and_wide.coverage
  119. long_and_wide.rs
  120. loop-break.cov-map
  121. loop-break.coverage
  122. loop-break.rs
  123. loop_break_value.cov-map
  124. loop_break_value.coverage
  125. loop_break_value.rs
  126. loops_branches.cov-map
  127. loops_branches.coverage
  128. loops_branches.rs
  129. macro_in_closure.cov-map
  130. macro_in_closure.coverage
  131. macro_in_closure.rs
  132. macro_name_span.cov-map
  133. macro_name_span.coverage
  134. macro_name_span.rs
  135. match_or_pattern.cov-map
  136. match_or_pattern.coverage
  137. match_or_pattern.rs
  138. nested_loops.cov-map
  139. nested_loops.coverage
  140. nested_loops.rs
  141. no_cov_crate.cov-map
  142. no_cov_crate.coverage
  143. no_cov_crate.rs
  144. no_spans.cov-map
  145. no_spans.coverage
  146. no_spans.rs
  147. no_spans_if_not.cov-map
  148. no_spans_if_not.coverage
  149. no_spans_if_not.rs
  150. overflow.cov-map
  151. overflow.coverage
  152. overflow.rs
  153. panic_unwind.cov-map
  154. panic_unwind.coverage
  155. panic_unwind.rs
  156. partial_eq.cov-map
  157. partial_eq.coverage
  158. partial_eq.rs
  159. README.md
  160. simple_loop.cov-map
  161. simple_loop.coverage
  162. simple_loop.rs
  163. simple_match.cov-map
  164. simple_match.coverage
  165. simple_match.rs
  166. sort_groups.cov-map
  167. sort_groups.coverage
  168. sort_groups.rs
  169. test_harness.cov-map
  170. test_harness.coverage
  171. test_harness.rs
  172. thin-lto.cov-map
  173. thin-lto.coverage
  174. thin-lto.rs
  175. tight_inf_loop.cov-map
  176. tight_inf_loop.coverage
  177. tight_inf_loop.rs
  178. trivial.cov-map
  179. trivial.coverage
  180. trivial.rs
  181. try_error_result.cov-map
  182. try_error_result.coverage
  183. try_error_result.rs
  184. unicode.cov-map
  185. unicode.coverage
  186. unicode.rs
  187. unreachable.cov-map
  188. unreachable.coverage
  189. unreachable.rs
  190. unused.cov-map
  191. unused.coverage
  192. unused.rs
  193. unused_mod.cov-map
  194. unused_mod.coverage
  195. unused_mod.rs
  196. uses_crate.cov-map
  197. uses_crate.coverage
  198. uses_crate.rs
  199. uses_inline_crate.cov-map
  200. uses_inline_crate.coverage
  201. uses_inline_crate.rs
  202. while.cov-map
  203. while.coverage
  204. while.rs
  205. while_early_ret.cov-map
  206. while_early_ret.coverage
  207. while_early_ret.rs
  208. yield.cov-map
  209. yield.coverage
  210. yield.rs
tests/coverage/README.md

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.