Skip to content

Commit

Permalink
a better fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-babichenko committed Nov 15, 2024
1 parent 4ef01e3 commit 074191f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,10 @@ jobs:

- name: Generate coverage report
run: |
set -x
BINARIES="$(cargo nextest list --list-type binaries-only --message-format json | jq -r '.["rust-binaries"] | .[] | "--object \(.["binary-path"])"' | tr '\n' ' ')"
ARGS="-instr-profile fixit.profdata $BINARIES --object ./target/debug/fixit"
while true; do
output=$(cargo profdata -- merge -sparse default_*.profraw -o fixit.profdata 2>&1)
if [[ ! $output =~ "warning" ]] && [[ ! $output =~ "error" ]]; then
break
fi
bad_file=$(echo "$output" | grep -o 'default_[^:]*\.profraw')
if [ -z "$bad_file" ]; then
break
fi
rm "$bad_file"
done
export LLVM_PROFILE_FILE="default_%m.profraw"
cargo profdata -- merge -sparse default_*.profraw -o fixit.profdata
cargo cov -- report --use-color --ignore-filename-regex='/.cargo/registry' $ARGS
cargo cov -- export -format=lcov $ARGS -sources src/{,**/}*.rs > fixit.lcov
Expand Down

0 comments on commit 074191f

Please sign in to comment.