Better coverage output, removing unnecessary unit scripts.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
gotestsum -- "$@"
|
||||
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
# install test dependencies once before running tests for each package. This
|
||||
# reduces the runtime from 200s down to 23s
|
||||
go test -i "$@"
|
||||
|
||||
echo "mode: atomic" > coverage.txt
|
||||
for pkg in "$@"; do
|
||||
./scripts/test/unit \
|
||||
-cover \
|
||||
-coverprofile=profile.out \
|
||||
-covermode=atomic \
|
||||
"${pkg}"
|
||||
|
||||
if test -f profile.out; then
|
||||
grep -v "^mode:" < profile.out >> coverage.txt || true
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user