Commit 663ab923 authored by Arnaud Rebillout's avatar Arnaud Rebillout

Add debian-specific patch to NOT use gotestsum

Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
parent d2fd751b
From cce626b54fa7607832e5fb6b9b5ad653d49dc7c7 Mon Sep 17 00:00:00 2001
From: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Date: Mon, 16 Sep 2019 13:27:36 +0700
Subject: [PATCH] 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 <arnaud.rebillout@collabora.com>
Origin: vendor, Debian
Forwarded: not-needed, Debian-specific
---
components/engine/hack/test/unit | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/engine/hack/test/unit b/engine/hack/test/unit
index 1aea06c54b..4d67969277 100755
--- a/engine/hack/test/unit
+++ b/engine/hack/test/unit
@@ -13,16 +13,21 @@
set -eu -o pipefail
BUILDFLAGS=( -tags 'netgo seccomp libdm_no_deferred_remove' )
-TESTFLAGS+="-test.timeout=${TIMEOUT:-5m}"
+TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
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
--
2.20.1
......@@ -6,6 +6,7 @@ debian-containerd-name.patch
debian-dockerd-binary-location.patch
debian-cgroupfs-mount-convenience-copy.patch
debian-nuke-no-prompt.patch
debian-dont-use-gotestsum-in-hack-test-unit.patch
buildkit-build-against-google-grpc-1.11.patch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment