diff --git a/Makefile b/Makefile index 64a989a8..81dceb78 100644 --- a/Makefile +++ b/Makefile @@ -82,9 +82,14 @@ test_race: @echo "==> Running go test --race" @go test -v -race $(PACKAGES) +test_cover: + @ bash tests/test_cover.sh + test_integrations: @bash test.sh +fmt: + @ go fmt ./... ######################################## ### Formatting, linting, and vetting diff --git a/test.sh b/test.sh index 978b26e1..e69de29b 100755 --- a/test.sh +++ b/test.sh @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -echo "==> Running unit tests" -for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done - -echo "==> Running integration tests (./tests)" -find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \; -# tests/test.sh requires that we run the installed cmds, must not be out of date -make install -bash tests/test.sh diff --git a/tests/test_cover.sh b/tests/test_cover.sh new file mode 100644 index 00000000..abbbbe56 --- /dev/null +++ b/tests/test_cover.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +echo "==> Running unit tests" +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done