1
0
mirror of https://github.com/docker/cli.git synced 2025-09-02 10:21:16 +03:00

Upload coverage report from outside of test container.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-05-18 10:42:05 -04:00
parent d79d903864
commit f6d148c632
5 changed files with 27 additions and 14 deletions

15
scripts/test/unit-with-coverage Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eu -o pipefail
for pkg in $(go list ./... | grep -v /vendor/); 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