Adopt scripts-to-rule-them-all: script/ entrypoints, Makefile shims
This commit is contained in:
18
script/test
Executable file
18
script/test
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# script/test: run the test suite. Quiet on success; on failure, rerun
|
||||
# verbosely for full diagnostic output (the exit 1 ensures the rerun
|
||||
# never turns a failure into a pass).
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
go test -race -timeout 30s ./... || {
|
||||
echo "--- Rerunning with -v for details ---"
|
||||
go test -race -timeout 30s -v ./...
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user