From: Arnaud Rebillout Date: Mon, 16 Sep 2019 06:27:36 +0000 (+0700) Subject: Dont use gotestsum in hack/test/unit X-Git-Tag: archive/raspbian/19.03.4+dfsg2-2+rpi1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=11c8ba7ba7b28167950dc9623956d35f66c1df06;p=docker.io.git Dont use gotestsum in hack/test/unit gotestsum is not yet in Debian, let's just stick to 'go test' for now. As soon as gotestsum is packaged for Debian (see #940225), we can drop this patch, and add gotestsum as a build dependency. This is a partial revert of the commit: https://github.com/docker/docker-ce/commit/bef34d1 Signed-off-by: Arnaud Rebillout Origin: vendor, Debian Forwarded: not-needed, Debian-specific Gbp-Pq: Name debian-dont-use-gotestsum-in-hack-test-unit.patch --- diff --git a/engine/hack/test/unit b/engine/hack/test/unit index a47a9393..4d679692 100755 --- a/engine/hack/test/unit +++ b/engine/hack/test/unit @@ -18,11 +18,16 @@ TESTDIRS="${TESTDIRS:-./...}" exclude_paths='/vendor/|/integration' pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)") -mkdir -p bundles -gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \ - "${BUILDFLAGS[@]}" \ - -cover \ - -coverprofile=bundles/profile.out \ - -covermode=atomic \ - ${TESTFLAGS} \ - ${pkg_list} +for pkg in $pkg_list; do + go test "${BUILDFLAGS[@]}" \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic \ + ${TESTFLAGS} \ + "${pkg}" + + if test -f profile.out; then + cat profile.out >> coverage.txt + rm profile.out + fi +done