Skip to content

Commit

Permalink
Auto merge of #110942 - Zalathar:coverage-tests, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't accidentally ignore all output in `tests/run-make/coverage-reports` diffs

Because the literal pipe `|` character was not escaped, these regexes ended up accidentally ignoring every line in the coverage report output, so the tests would not fail even if the output was wrong.
  • Loading branch information
bors committed Apr 30, 2023
2 parents c1bb0e0 + a6fa0e0 commit 89158e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/run-make/coverage-reports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ else
# files are redundant, so there is no need to generate `expected_*.json` files or
# compare actual JSON results.)

$(DIFF) --ignore-matching-lines='^ | .*::<.*>.*:$$' --ignore-matching-lines='^ | <.*>::.*:$$' \
$(DIFF) --ignore-matching-lines='^ \| .*::<.*>.*:$$' --ignore-matching-lines='^ \| <.*>::.*:$$' \
expected_show_coverage.$@.txt "$(TMPDIR)"/actual_show_coverage.$@.txt || \
( grep -q '^\/\/ ignore-llvm-cov-show-diffs' $(SOURCEDIR)/$@.rs && \
>&2 echo 'diff failed, but suppressed with `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs' \
Expand Down

0 comments on commit 89158e2

Please sign in to comment.