github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/tests/Makefile (about) 1 include ../includes.mk 2 3 # the filepath to this repository, relative to $GOPATH/src 4 repo_path = github.com/deis/deis/tests 5 6 GO_FILES = $(wildcard *.go) 7 GO_PACKAGES = dockercli etcdutils mock utils 8 GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES)) 9 10 MOCK_STORE_IMAGE = $(IMAGE_PREFIX)mock-store:$(BUILD_TAG) 11 TEST_ETCD_IMAGE = $(IMAGE_PREFIX)test-etcd:$(BUILD_TAG) 12 TEST_POSTGRESQL_IMAGE = $(IMAGE_PREFIX)test-postgresql:$(BUILD_TAG) 13 14 test: test-smoke 15 16 test-smoke: test-style 17 # TODO: remove GOMAXPROCS=1 when concurrent stdout issues are fixed 18 GOMAXPROCS=1 godep go test -tags integration -short -timeout 20m -v -run TestSmoke 19 20 test-full: test-style 21 # TODO: remove GOMAXPROCS=1 when concurrent stdout issues are fixed 22 GOMAXPROCS=1 godep go test -tags integration -v -run TestGlobal 23 GOMAXPROCS=1 godep go test -tags integration -v -run TestApps 24 GOMAXPROCS=1 godep go test -tags integration -v -run TestAuth 25 GOMAXPROCS=1 godep go test -tags integration -v -run TestBuilds 26 GOMAXPROCS=1 godep go test -tags integration -v -run TestConfig 27 GOMAXPROCS=1 godep go test -tags integration -v -run TestDomains 28 GOMAXPROCS=1 godep go test -tags integration -v -run TestHealthcheck 29 GOMAXPROCS=1 godep go test -tags integration -v -run TestKeys 30 GOMAXPROCS=1 godep go test -tags integration -v -run TestPerms 31 GOMAXPROCS=1 godep go test -tags integration -v -run TestPs 32 GOMAXPROCS=1 godep go test -tags integration -v -run TestReleases 33 GOMAXPROCS=1 godep go test -tags integration -v -run TestUsers 34 35 mock-store: 36 docker build -t $(MOCK_STORE_IMAGE) fixtures/mock-store/ 37 38 test-etcd: 39 docker build -t $(TEST_ETCD_IMAGE) fixtures/test-etcd/ 40 41 test-postgresql: 42 docker build -t $(TEST_POSTGRESQL_IMAGE) fixtures/test-postgresql/ 43 44 test-style: 45 # display output, then check 46 $(GOFMT) $(GO_PACKAGES) $(GO_FILES) 47 @$(GOFMT) $(GO_PACKAGES) $(GO_FILES) | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi 48 $(GOVET) $(repo_path) $(GO_PACKAGES_REPO_PATH) 49 $(GOLINT) ./... 50 51 nuke_from_orbit: 52 -docker kill `docker ps -q` 53 -docker rm -v `docker ps -a -q` 54 -docker rmi -f `docker images -q`