Artifact 59347310b65006ddf16aedeca5a8cbf02e65ef93eb748485e25873b3cc9d1178:
- File
tools/test-assertions.sh
— part of check-in
[11f47eadde]
at
2026-11-18 11:58:22
on branch trunk
— Record S0/S1 qualification groundwork before product code
Contract maps and pinned Pi reference, local C qualification fixtures, MC/DC and Fil-C remote lifecycle tooling, and the context transaction substrate probe. No product harness code yet. (user: dmestas, size: 895) [annotate] [blame] [check-ins using]
#!/bin/sh # Qualification tests must fail to build if their checks would compile away. set -eu ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) CC=${CC:-cc} if ! command -v "$CC" >/dev/null 2>&1; then printf 'GATED: compiler not found: %s\n' "$CC" >&2 exit 2 fi mkdir -p "$ROOT/build/qualification" LOG="$ROOT/build/qualification/assertion-guard.log" if printf '#include "qual.h"\nint main(void) { return 0; }\n' | "$CC" -std=c11 -I"$ROOT/test/qualification" -DNDEBUG -x c -fsyntax-only - >"$LOG" 2>&1; then printf '%s\n' 'FAIL: -DNDEBUG would silently disable qualification assertions.' >&2 exit 1 fi if ! grep -q 'S0 qualification requires assertions' "$LOG"; then printf '%s\n' 'FAIL: compilation failed for an unrelated reason; inspect assertion-guard.log.' >&2 exit 1 fi printf '%s\n' 'PASS: assertion-disabled qualification builds are explicitly rejected.'