#!/usr/bin/env bash set -Eeuo pipefail trap 'status=$?; printf "Acceptance failed (exit %s): %s\n" "$status" "$BASH_COMMAND" >&2; exit "$status"' ERR if [[ -n ${TEST_TMPDIR:-} ]]; then export TMPDIR TMPDIR=$(CDPATH= cd -- "$TEST_TMPDIR" && pwd) [[ -w $TMPDIR && -x $TMPDIR ]] fi project_dir=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) cd -- "$project_dir" run() { printf '\n==> %s\n' "$*" "$@" } run go test -timeout=180s ./... run go test -race -timeout=180s ./... run go vet ./... run go build ./... run npm --prefix web test run npm --prefix web run build run node --check scripts/test-panel.mjs printf '\nAll acceptance checks passed. 所有测试与检查均通过。\n'