فهرست منبع

All supported Go versions have -cover now

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Justin Cormack 8 سال پیش
والد
کامیت
f243bfbc9d
2فایلهای تغییر یافته به همراه2 افزوده شده و 9 حذف شده
  1. 1 6
      hack/make/cover
  2. 1 3
      hack/make/test-unit

+ 1 - 6
hack/make/cover

@@ -12,9 +12,4 @@ bundle_cover() {
 	done
 }
 
-if [ "$HAVE_GO_TEST_COVER" ]; then
-	bundle_cover 2>&1 | tee "$DEST/report.log"
-else
-	echo >&2 'warning: the current version of go does not support -cover'
-	echo >&2 '  skipping test coverage report'
-fi
+bundle_cover 2>&1 | tee "$DEST/report.log"

+ 1 - 3
hack/make/test-unit

@@ -34,9 +34,7 @@ bundle_test_unit() {
 		| grep -v github.com/docker/docker/vendor \
 		| grep -v github.com/docker/docker/man \
 		| grep -v github.com/docker/docker/integration-cli)
-	go test $COVER -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
+	go test -cover -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
 }
 
-COVER=-cover
-
 bundle_test_unit 2>&1 | tee -a "$DEST/test.log"