Skip to content

Commit

Permalink
Coverage logs sometimes contain binary, confusing grep. Ignore it.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGrosser committed Dec 19, 2023
1 parent 7e8683c commit 3d1a59d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ sudo openocd -f interface/cmsis-dap.cfg -c "adapter speed 5000" -f target/rp2040
timeout --verbose --signal=INT --kill-after=1s 120s arm-eabi-gdb --batch --command=coverage.gdb
check_error "Test failed"

let first=$(grep --line-number 'Testing...' coverage.log | head -n1 | cut -d':' -f1)
let last=$(grep --line-number '== GNATcoverage source trace file ==' coverage.log | head -n1 | cut -d':' -f1)
let first=$(grep --text --line-number 'Testing...' coverage.log | head -n1 | cut -d':' -f1)
let last=$(grep --text --line-number '== GNATcoverage source trace file ==' coverage.log | head -n1 | cut -d':' -f1)
head -n $(($last-1)) coverage.log | tail -n $(($last-$first)) 1>&2

gnatcov extract-base64-trace coverage.log coverage.trace
Expand Down

0 comments on commit 3d1a59d

Please sign in to comment.