2016-02-13 00:50:37 +00:00
|
|
|
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
2019-07-24 21:06:39 +00:00
|
|
|
TEST_RESULTS_DIR?=/tmp/test-results
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
test:
|
2019-06-19 12:50:48 +00:00
|
|
|
go test -timeout=60s -race .
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
integ: test
|
2017-08-24 21:44:05 +00:00
|
|
|
INTEG_TESTS=yes go test -timeout=25s -run=Integ .
|
2016-02-13 00:50:37 +00:00
|
|
|
|
2019-07-24 21:06:39 +00:00
|
|
|
ci.test-norace:
|
|
|
|
gotestsum --format=short-verbose --junitfile $(TEST_RESULTS_DIR)/gotestsum-report-test.xml -- -timeout=60s
|
|
|
|
|
|
|
|
ci.test:
|
|
|
|
gotestsum --format=short-verbose --junitfile $(TEST_RESULTS_DIR)/gotestsum-report-test.xml -- -timeout=60s -race .
|
|
|
|
|
|
|
|
ci.integ: ci.test
|
|
|
|
INTEG_TESTS=yes gotestsum --format=short-verbose --junitfile $(TEST_RESULTS_DIR)/gotestsum-report-integ.xml -- -timeout=25s -run=Integ .
|
|
|
|
|
2017-08-24 21:44:05 +00:00
|
|
|
fuzz:
|
|
|
|
go test -timeout=300s ./fuzzy
|
2019-07-24 21:06:39 +00:00
|
|
|
|
2016-02-13 00:50:37 +00:00
|
|
|
deps:
|
2019-04-09 22:09:22 +00:00
|
|
|
go get -t -d -v ./...
|
2016-02-13 00:50:37 +00:00
|
|
|
echo $(DEPS) | xargs -n1 go get -d
|
|
|
|
|
|
|
|
cov:
|
|
|
|
INTEG_TESTS=yes gocov test github.com/hashicorp/raft | gocov-html > /tmp/coverage.html
|
|
|
|
open /tmp/coverage.html
|
|
|
|
|
|
|
|
.PHONY: test cov integ deps
|