Merge pull request #1147 from dotcloud/1104-testing-static
testing, issue #1104: Make the test use static flags
This commit is contained in:
commit
c21c5afe00
6
Makefile
6
Makefile
|
@ -11,7 +11,7 @@ BUILD_DIR := $(CURDIR)/.gopath
|
||||||
GOPATH ?= $(BUILD_DIR)
|
GOPATH ?= $(BUILD_DIR)
|
||||||
export GOPATH
|
export GOPATH
|
||||||
|
|
||||||
GO_OPTIONS ?=
|
GO_OPTIONS ?= -a -ldflags='-w -d'
|
||||||
ifeq ($(VERBOSE), 1)
|
ifeq ($(VERBOSE), 1)
|
||||||
GO_OPTIONS += -v
|
GO_OPTIONS += -v
|
||||||
endif
|
endif
|
||||||
|
@ -80,10 +80,10 @@ test:
|
||||||
tar --exclude=${BUILD_SRC} -cz . | tar -xz -C ${BUILD_PATH}
|
tar --exclude=${BUILD_SRC} -cz . | tar -xz -C ${BUILD_PATH}
|
||||||
GOPATH=${CURDIR}/${BUILD_SRC} go get -d
|
GOPATH=${CURDIR}/${BUILD_SRC} go get -d
|
||||||
# Do the test
|
# Do the test
|
||||||
sudo -E GOPATH=${CURDIR}/${BUILD_SRC} go test ${GO_OPTIONS}
|
sudo -E GOPATH=${CURDIR}/${BUILD_SRC} CGO_ENABLED=0 go test ${GO_OPTIONS}
|
||||||
|
|
||||||
testall: all
|
testall: all
|
||||||
@(cd $(DOCKER_DIR); sudo -E go test ./... $(GO_OPTIONS))
|
@(cd $(DOCKER_DIR); CGO_ENABLED=0 sudo -E go test ./... $(GO_OPTIONS))
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@gofmt -s -l -w .
|
@gofmt -s -l -w .
|
||||||
|
|
Loading…
Reference in New Issue