From 56f73c9484c5e78b860acdbe0db0b81f84a88262 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Sat, 20 Jul 2019 13:16:08 +0200 Subject: [PATCH] ci: Fix coverage for MKVS tests --- .buildkite/go/test_and_coverage_ekiden.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.buildkite/go/test_and_coverage_ekiden.sh b/.buildkite/go/test_and_coverage_ekiden.sh index 580767b1f4e..af55283bca7 100755 --- a/.buildkite/go/test_and_coverage_ekiden.sh +++ b/.buildkite/go/test_and_coverage_ekiden.sh @@ -27,10 +27,19 @@ export EKIDEN_TEST_WORKER_HOST_RUNTIME_BINARY=$(pwd)/target/debug/simple-keyvalu ###################### pushd go make generate - env -u GOPATH go test -race -coverprofile=coverage.txt -covermode=atomic -v `go list ./... | grep -v github.com/oasislabs/ekiden/go/ekiden` + # We need to do multiple test passes for different parts to get correct coverage. + env -u GOPATH go test -race -coverprofile=coverage.txt -covermode=atomic -v \ + $(go list ./... | \ + grep -v github.com/oasislabs/ekiden/go/ekiden | \ + grep -v github.com/oasislabs/ekiden/go/storage/mkvs/urkel ) + # Ekiden node tests. pushd ekiden env -u GOPATH go test -race -coverpkg ../... -coverprofile=coverage.txt -covermode=atomic -v popd + # Urkel tree tests. + pushd storage/mkvs/urkel + env -u GOPATH go test -race -coverpkg ./... -coverprofile=coverage.txt -covermode=atomic -v + popd popd ############################