Skip to content

Commit

Permalink
Merge pull request #5 from zillow/fix-coverage-report
Browse files Browse the repository at this point in the history
Updated coverage report (cover.out instead of omni.out).
  • Loading branch information
stewartboyd119 authored Jul 23, 2024
2 parents 81dd63c + 19bb685 commit 68f29be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source_res=$topdir/source.res
root_out=$topdir/root.out
source_out=$topdir/source.out

omni_out=$topdir/omni.out
cover_out=$topdir/cover.out

function quit() {
echo "Error in coverage.sh. Stopping processing";
Expand All @@ -30,12 +30,12 @@ go test -c -coverpkg=$pck1 -covermode=atomic -o "$source_res" $pck2
go tool test2json -t "$source_res" -test.v -test.coverprofile "$source_out"

# delete aggregate file
rm "$omni_out"
rm "$cover_out"

# combine the results (the first line should be omitted on subsequent appends)
cat "$root_out" >> "$omni_out"
tail -n+2 "$source_out" >> "$omni_out"
cat "$root_out" >> "$cover_out"
tail -n+2 "$source_out" >> "$cover_out"

# print aggregated results
go tool cover -func="$omni_out"
go tool cover -html="$omni_out" -o cover.html
go tool cover -func="$cover_out"
go tool cover -html="$cover_out" -o cover.html

0 comments on commit 68f29be

Please sign in to comment.