Speed up testing with coverage

By running a 'go test -i' on all the packages first the overall runtime is significantly
decreased.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-06-14 10:55:11 -07:00
parent d209929aab
commit 3a9ba545bc
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail 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 for pkg in $@; do
./scripts/test/unit \ ./scripts/test/unit \
-cover \ -cover \