mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-28 09:26:26 -06:00
Coverage updates, roll back makefile change, use travis specific script
This commit is contained in:
parent
449ea72e87
commit
9ae266f8fe
@ -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
|
||||||
|
2
Makefile
2
Makefile
@ -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
|
||||||
|
@ -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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user