1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00
Files
cli/scripts/test/unit-with-coverage
2017-09-07 17:50:44 -04:00

20 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