Skip to content

Commit

Permalink
Merge pull request #8693 from gyuho/makefile
Browse files Browse the repository at this point in the history
Makefile: fix 'test', add 'test-all' commands with docker
  • Loading branch information
gyuho committed Oct 13, 2017
2 parents 764a0f7 + f0a78eb commit d392deb
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ build:
./bin/etcd --version
ETCDCTL_API=3 ./bin/etcdctl version

.PHONY: test
test:
$(info log-file: test-$(TEST_SUFFIX).log)
PASSES='fmt bom dep compile build unit' ./test 2>&1 | tee test-$(TEST_SUFFIX).log
! grep FAIL -A10 -B50 test-$(TEST_SUFFIX).log

test-fmt:
$(info log-file: test-fmt-$(TEST_SUFFIX).log)
PASSES='fmt' ./test 2>&1 | tee test-fmt-$(TEST_SUFFIX).log
! grep FAIL -A10 -B50 test-fmt-$(TEST_SUFFIX).log

test-all:
$(info log-file: test-all-$(TEST_SUFFIX).log)
RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee test-all-$(TEST_SUFFIX).log
Expand Down Expand Up @@ -76,7 +82,7 @@ docker-test:
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee docker-test-$(TEST_SUFFIX).log"
/bin/bash -c "PASSES='fmt bom dep compile build unit' ./test 2>&1 | tee docker-test-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-$(TEST_SUFFIX).log

docker-test-386:
Expand All @@ -88,6 +94,33 @@ docker-test-386:
/bin/bash -c "GOARCH=386 PASSES='build unit integration_e2e' ./test 2>&1 | tee docker-test-386-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-386-$(TEST_SUFFIX).log

docker-test-fmt:
$(info log-file: docker-test-fmt-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "PASSES='fmt' ./test 2>&1 | tee docker-test-fmt-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-fmt-$(TEST_SUFFIX).log

docker-test-all:
$(info log-file: docker-test-all-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee docker-test-all-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-all-$(TEST_SUFFIX).log

docker-test-all-386:
$(info log-file: docker-test-all-386-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "GOARCH=386 PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee docker-test-all-386-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-all-386-$(TEST_SUFFIX).log

docker-test-proxy:
$(info log-file: docker-test-proxy-$(TEST_SUFFIX).log)
docker run \
Expand Down

0 comments on commit d392deb

Please sign in to comment.