mirror of
https://github.com/genuinetools/reg.git
synced 2024-10-03 13:51:45 -04:00
3834c605e5
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
19 lines
432 B
Bash
Executable file
19 lines
432 B
Bash
Executable file
#!/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 "$@"
|
|
|
|
for pkg in "$@"; do
|
|
./scripts/test/unit \
|
|
-cover \
|
|
-coverprofile=profile.out \
|
|
-covermode=atomic \
|
|
"${pkg}"
|
|
|
|
if test -f profile.out; then
|
|
cat profile.out >> coverage.txt
|
|
rm profile.out
|
|
fi
|
|
done
|