postjevsql.git / tests / run-check.sh
1#!/usr/bin/env bash

The repo's whole check, as one command: every unit and integration test through buck2, in the devshell that provisions the toolchains.

Mefi Studio runs this file to verify a finished task (main.cjs baseCheckForProject finds test/ or tests/run-check.sh off Windows).

Checks in one checkout share its buck daemon, so they queue on a lock rather than race each other's test executor (tests/CLAUDE.md).

10set -euo pipefail
11root=$(git -C "$(dirname "$0")" rev-parse --show-toplevel)
12cd "$root"
13mkdir -p buck-out
14exec 9>buck-out/run-check.lock
15flock 9

Not exec'd, and with fd 9 closed: a daemon buck starts here would otherwise inherit the lock's descriptor and hold it for its whole life, so every later check in this checkout waits forever (tests/CLAUDE.md).

19nix develop -c buck2 test //... 9>&-