Coverage updates, roll back makefile change, use travis specific script

This commit is contained in:
Pam Selle 2020-03-03 14:10:04 -05:00
parent 449ea72e87
commit 9ae266f8fe
3 changed files with 12 additions and 13 deletions

View File

@ -33,7 +33,8 @@ before_script:
- git config --global url.https://github.com/.insteadOf ssh://git@github.com/ - git config --global url.https://github.com/.insteadOf ssh://git@github.com/
script: script:
- make test - make fmtcheck generate
- bash scripts/travis.sh
- go mod verify - go mod verify
- make e2etest - make e2etest
- GOOS=windows go build -mod=vendor - GOOS=windows go build -mod=vendor

View File

@ -27,7 +27,7 @@ plugin-dev: generate
# we run this one package at a time here because running the entire suite in # we run this one package at a time here because running the entire suite in
# one command creates memory usage issues when running in Travis-CI. # one command creates memory usage issues when running in Travis-CI.
test: fmtcheck generate test: fmtcheck generate
go list -mod=vendor $(TEST) | xargs -t -n4 go test $(TESTARGS) -mod=vendor -timeout=2m -parallel=4 -coverprofile=coverage.txt -covermode=atomic go list -mod=vendor $(TEST) | xargs -t -n4 go test $(TESTARGS) -mod=vendor -timeout=2m -parallel=4
# testacc runs acceptance tests # testacc runs acceptance tests
testacc: fmtcheck generate testacc: fmtcheck generate

View File

@ -1,14 +1,12 @@
#!/bin/bash #!/bin/bash
set -e
echo "" > coverage.txt
# Consistent output so travis does not think we're dead during long running for d in $(go list ./... | grep -v vendor); do
# tests. go test -mod=vendor -timeout=2m -parallel=4 -coverprofile=profile.out -covermode=atomic $d
export PING_SLEEP=30 if [ -f profile.out ]; then
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" & cat profile.out >> coverage.txt
PING_LOOP_PID=$! rm profile.out
fi
make testacc done
TEST_OUTPUT=$?
kill $PING_LOOP_PID
exit $TEST_OUTPUT