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:
15
scripts/test/unit-with-coverage
Executable file
15
scripts/test/unit-with-coverage
Executable 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
|
Reference in New Issue
Block a user