test.sh: Reference test.sh instead of deprecated test

This commit is contained in:
Lili Cosic 2021-05-19 18:35:57 +02:00
parent 7957f4461d
commit e0e4ddc268

22
test.sh
View File

@ -1,35 +1,35 @@
#!/usr/bin/env bash
#
# Run all etcd tests
# ./test
# ./test -v
# ./test.sh
# ./test.sh -v
#
#
# Run specified test pass
#
# $ PASSES=unit ./test
# $ PASSES=integration ./test
# $ PASSES=unit ./test.sh
# $ PASSES=integration ./test.sh
#
#
# Run tests for one package
# Each pass has different default timeout, if you just run tests in one package or 1 test case then you can set TIMEOUT
# flag for different expectation
#
# $ PASSES=unit PKG=./wal TIMEOUT=1m ./test
# $ PASSES=integration PKG=./clientv3 TIMEOUT=1m ./test
# $ PASSES=unit PKG=./wal TIMEOUT=1m ./test.sh
# $ PASSES=integration PKG=./clientv3 TIMEOUT=1m ./test.sh
#
# Run specified unit tests in one package
# To run all the tests with prefix of "TestNew", set "TESTCASE=TestNew ";
# to run only "TestNew", set "TESTCASE="\bTestNew\b""
#
# $ PASSES=unit PKG=./wal TESTCASE=TestNew TIMEOUT=1m ./test
# $ PASSES=unit PKG=./wal TESTCASE="\bTestNew\b" TIMEOUT=1m ./test
# $ PASSES=integration PKG=./client/integration TESTCASE="\bTestV2NoRetryEOF\b" TIMEOUT=1m ./test
# $ PASSES=unit PKG=./wal TESTCASE=TestNew TIMEOUT=1m ./test.sh
# $ PASSES=unit PKG=./wal TESTCASE="\bTestNew\b" TIMEOUT=1m ./test.sh
# $ PASSES=integration PKG=./client/integration TESTCASE="\bTestV2NoRetryEOF\b" TIMEOUT=1m ./test.sh
#
#
# Run code coverage
# COVERDIR must either be a absolute path or a relative path to the etcd root
# $ COVERDIR=coverage PASSES="build build_cov cov" ./test
# $ COVERDIR=coverage PASSES="build build_cov cov" ./test.sh
# $ go tool cover -html ./coverage/cover.out
set -e
set -o pipefail
@ -290,7 +290,7 @@ function cov_pass {
fi
if [ ! -f "bin/etcd_test" ]; then
log_error "etcd_test binary not found. Call: PASSES='build_cov' ./test"
log_error "etcd_test binary not found. Call: PASSES='build_cov' ./test.sh"
return 255
fi