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 <arnaud.rebillout@collabora.com>
Origin: vendor, Debian
Forwarded: not-needed, Debian-specific
Gbp-Pq: Name debian-dont-use-gotestsum-in-hack-test-unit.patch
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