diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2dedff8..f43f249 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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