Browse code

Fix "go tool cover" detection to only add -cover and -coverprofile if we both have cover support in Go, and if we have the cover tool downloaded

Tianon Gravi authored on 2013/12/17 14:54:06
Showing 1 changed files
... ...
@@ -66,7 +66,10 @@ LDFLAGS_STATIC='-X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode ext
66 66
 BUILDFLAGS='-tags netgo'
67 67
 
68 68
 HAVE_GO_TEST_COVER=
69
-if go help testflag | grep -q -- -cover; then
69
+if \
70
+	go help testflag | grep -q -- -cover \
71
+	&& go tool -n cover > /dev/null 2>&1 \
72
+; then
70 73
 	HAVE_GO_TEST_COVER=1
71 74
 fi
72 75