mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
1c23de0e64
For me it increased speed of unit-tests tremendously, however this disabled coverage profiles generation, which I think is pretty good tradeoff. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
22 lines
720 B
Bash
22 lines
720 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Run Docker's test suite, including sub-packages, and store their output as a bundle
|
|
# If $TESTFLAGS is set in the environment, it is passed as extra arguments to 'go test'.
|
|
# You can use this to select certain tests to run, eg.
|
|
#
|
|
# TESTFLAGS='-test.run ^TestBuild$' ./hack/make.sh test-unit
|
|
#
|
|
bundle_test_unit() {
|
|
date
|
|
pkg_list=$(go list -e \
|
|
-f '{{if ne .Name "github.com/docker/docker"}}
|
|
{{.ImportPath}}
|
|
{{end}}' \
|
|
"${BUILDFLAGS[@]}" ./... \
|
|
| grep -v github.com/docker/docker/vendor \
|
|
| grep -v github.com/docker/docker/integration-cli)
|
|
go test -cover $GCCGOFLAGS -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
|
|
}
|
|
|
|
bundle_test_unit 2>&1 | tee -a "$DEST/test.log"
|