@ -14,6 +14,7 @@
GO ?= GO15VENDOREXPERIMENT = 1 go
GO ?= GO15VENDOREXPERIMENT = 1 go
GOPATH := $( firstword $( subst :, ,$( shell $( GO) env GOPATH) ) )
GOPATH := $( firstword $( subst :, ,$( shell $( GO) env GOPATH) ) )
GOARCH := $( shell $( GO) env GOARCH)
GOARCH := $( shell $( GO) env GOARCH)
GOHOSTARCH := $( shell $( GO) env GOHOSTARCH)
PROMU ?= $( GOPATH) /bin/promu
PROMU ?= $( GOPATH) /bin/promu
STATICCHECK ?= $( GOPATH) /bin/staticcheck
STATICCHECK ?= $( GOPATH) /bin/staticcheck
@ -26,6 +27,11 @@ DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
MACH ?= $( shell uname -m)
MACH ?= $( shell uname -m)
DOCKERFILE ?= Dockerfile
DOCKERFILE ?= Dockerfile
i f e q ( $( GOHOSTARCH ) , a m d 6 4 )
# Only supported on amd64
test-flags := -race
e n d i f
i f e q ( $( OS ) , W i n d o w s _ N T )
i f e q ( $( OS ) , W i n d o w s _ N T )
OS_detected := Windows
OS_detected := Windows
e l s e
e l s e
@ -63,7 +69,7 @@ style:
test : collector /fixtures /sys /.unpacked
test : collector /fixtures /sys /.unpacked
@echo ">> running tests"
@echo ">> running tests"
@$( GO) test -short -race $( pkgs)
$( GO) test -short $( test-flags) $( pkgs)
test-32bit : collector /fixtures /sys /.unpacked
test-32bit : collector /fixtures /sys /.unpacked
@echo ">> running tests in 32-bit mode"
@echo ">> running tests in 32-bit mode"