Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move coverage generation into a separate script
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# This is a simple script to run our tests and accumulate the | ||
# resulting coverage report into a single coverage.out file | ||
|
||
fail=0 | ||
|
||
echo "mode: set" > coverage.out | ||
|
||
go test -v . -covermode=count -coverprofile=magic_packet.out || fail=1 | ||
cat magic_packet.out | tail -n +2 >> coverage.out | ||
rm magic_packet.out | ||
|
||
go test -v ./cmd/wol -covermode=count -coverprofile=wol.out || fail=1 | ||
cat wol.out | tail -n +2 >> coverage.out | ||
rm wol.out |