Skip to content

Commit

Permalink
Updated coverage report (cover.out instead of omni.out). Needed for c…
Browse files Browse the repository at this point in the history
…odecov.io
  • Loading branch information
stewartboyd119 committed Jul 23, 2024
1 parent c433bed commit 19bb685
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 19bb685

Please sign in to comment.