forked from quic-go/quic-go
Merge pull request #2701 from lucas-clemente/fix-travis-script
fix travis script
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ ${TESTMODE} == "lint" ]; then
|
if [ "${TESTMODE}" == "lint" ]; then
|
||||||
.travis/no_ginkgo.sh
|
.travis/no_ginkgo.sh
|
||||||
./bin/golangci-lint run ./...
|
./bin/golangci-lint run ./...
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${TESTMODE} == "gogenerate" ]; then
|
if [ "${TESTMODE}" == "gogenerate" ]; then
|
||||||
find . -type f -name "*.go" -exec shasum {} \; > checksums_before.txt
|
find . -type f -name "*.go" -exec shasum {} \; > checksums_before.txt
|
||||||
# delete all go-generated files generated (that adhere to the comment convention)
|
# delete all go-generated files generated (that adhere to the comment convention)
|
||||||
grep --include \*.go --exclude-dir quictrace/ -lrIZ "^// Code generated .* DO NOT EDIT\.$" . | xargs --null rm
|
grep --include \*.go --exclude-dir quictrace/ -lrIZ "^// Code generated .* DO NOT EDIT\.$" . | xargs --null rm
|
||||||
@@ -18,28 +18,28 @@ if [ ${TESTMODE} == "gogenerate" ]; then
|
|||||||
# now generate everything
|
# now generate everything
|
||||||
go generate ./...
|
go generate ./...
|
||||||
find . -type f -name "*.go" -exec shasum {} \; > checksums_after.txt
|
find . -type f -name "*.go" -exec shasum {} \; > checksums_after.txt
|
||||||
DIFF=`diff checksums_before.txt checksums_after.txt`
|
DIFF=$(diff checksums_before.txt checksums_after.txt)
|
||||||
echo $DIFF
|
echo "$DIFF"
|
||||||
if [ ! -z "$var" ]; then
|
if [ -n "$DIFF" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${TESTMODE} == "unit" ]; then
|
if [ "${TESTMODE}" == "unit" ]; then
|
||||||
ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
||||||
# run unit tests with the Go race detector
|
# run unit tests with the Go race detector
|
||||||
# The Go race detector only works on amd64.
|
# The Go race detector only works on amd64.
|
||||||
if [ ${TRAVIS_GOARCH} == 'amd64' ]; then
|
if [ "${TRAVIS_GOARCH}" == 'amd64' ]; then
|
||||||
ginkgo -race -r -v -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
ginkgo -race -r -v -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${TESTMODE} == "integration" ]; then
|
if [ "${TESTMODE}" == "integration" ]; then
|
||||||
# run benchmark tests
|
# run benchmark tests
|
||||||
ginkgo -randomizeAllSpecs -randomizeSuites -trace benchmark -- -size=10
|
ginkgo -randomizeAllSpecs -randomizeSuites -trace benchmark -- -size=10
|
||||||
# run benchmark tests with the Go race detector
|
# run benchmark tests with the Go race detector
|
||||||
# The Go race detector only works on amd64.
|
# The Go race detector only works on amd64.
|
||||||
if [ ${TRAVIS_GOARCH} == 'amd64' ]; then
|
if [ "${TRAVIS_GOARCH}" == 'amd64' ]; then
|
||||||
ginkgo -race -randomizeAllSpecs -randomizeSuites -trace benchmark -- -size=5
|
ginkgo -race -randomizeAllSpecs -randomizeSuites -trace benchmark -- -size=5
|
||||||
fi
|
fi
|
||||||
# run integration tests
|
# run integration tests
|
||||||
|
|||||||
Reference in New Issue
Block a user