Files
mesh-host/merge-check.sh
T
jochen f823ade868 Leave the gate to the build seat; check the node-engine's own code here (hq ADR 0237)
The build seat now runs the gate itself, judging a node-engine change with the change's
validator in the running controller because the module graph builds mesh-host from here.
This script is the repository's own layer (mesh/repo-check): format, vet, and the suite
under the race detector when the toolchain can.
2026-10-06 21:51:49 +02:00

30 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# mesh-check-toolchain: go
#
# The node-engine's own check (novox/hq ADR 0237 as amended): the second layer of a pull request's merge
# check, `mesh/repo-check`, run by the build seat in the mesh's Go toolchain — and by hand.
#
# The gate — the controller the mesh runs, built with THIS change's validator in place of the one it
# vendors, composing and validating every machine of the facts snapshot — is the build seat's first layer
# (`mesh/merge-gate`), run because the mesh's module graph builds `mesh-host` from this repository and
# judged so because it does. It is not repeated here. This is the code's own quality and its suite:
# formatted, vetted, and every test, under the race detector when the toolchain has a C compiler.
#
# Exit 0 is a pass; anything else fails `mesh/repo-check` with the last line printed.
set -eu
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "not gofmt'd:"
echo "$unformatted"
exit 1
fi
CGO_ENABLED=0 go vet ./...
if command -v gcc >/dev/null 2>&1; then
CGO_ENABLED=1 go test -race -count=1 ./...
else
echo "NOT RACE-CHECKED: the toolchain holds no C compiler; the suite runs without the race detector"
CGO_ENABLED=0 go test -count=1 ./...
fi