The template's files at a77fd30, without its history or LICENSE, after script/rename simplexcalc. Model: opus-5-5
22 lines
677 B
Bash
Executable File
22 lines
677 B
Bash
Executable File
#!/bin/sh
|
|
# script/test: run the test suite. Quiet on success; on failure, rerun
|
|
# with -v for full diagnostic output (and still fail — the first run
|
|
# already proved the tests are broken).
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
# -count=1 disables the test result cache. Without it a repeat run on
|
|
# an unchanged tree reports every package `ok ... (cached)` and exits
|
|
# 0 having executed nothing — a gate that cannot fail.
|
|
go test -count=1 -timeout 90s -race -cover ./... || {
|
|
echo "--- Rerunning with -v for details ---"
|
|
go test -count=1 -timeout 90s -race -v ./...
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
main "$@"
|