Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/blob/main/scripts/test_check_candidate_pins.sh # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-architecture-mv / scripts / test_check_candidate_pins.sh` 170 lines ยท 11093 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # Test for tools/candidate/check_pins.om. Offline: lock files are served from a temp tree by a CAND_FILE_AT stub. 3 # The checker is compiled here with the pinned seeded compiler named by AIEN_OMC (exit 3 = NOT_RUN without it). 4 set -u 5 here="$(cd "$(dirname "$0")" && pwd)" 6 src="$here/../tools/candidate/check_pins.om" 7 omc="${AIEN_OMC:-}" 8 [ -n "$omc" ] && [ -x "$omc" ] || { echo "test_check_candidate_pins: AIEN_OMC is not an executable omc (NOT_RUN)" >&2; exit 3; } 9 tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT 10 chk="$tmp/check_pins" 11 "$omc" < "$src" > "$chk" && chmod +x "$chk" || { echo "TEST FAIL: $src does not compile with $omc"; exit 1; } 12 OM=`1111111111111111111111111111111111111111`; SC=`2222222222222222222222222222222222222222` 13 AO=`3333333333333333333333333333333333333333`; PH=`4444444444444444444444444444444444444444` 14 PR=`5555555555555555555555555555555555555555`; CS=`6666666666666666666666666666666666666666` 15 SP=`7777777777777777777777777777777777777777`; AR=`8888888888888888888888888888888888888888` 16 OTHER=`9999999999999999999999999999999999999999` 17 cat > "$tmp/stub.sh" </dev/null || { echo "{\"message\":\"No commit found for the ref \$2\"}"; exit 1; } 21 S 22 chmod +x "$tmp/stub.sh"; export CAND_FILE_AT="$tmp/stub.sh" 23 24 serve() { mkdir -p "$(dirname "$tmp/files/$1")"; cat > "$tmp/files/$1"; } 25 tree() { # tree : the consistent lock files 26 rm -rf "$tmp/files" 27 echo "$OM" | serve "aien-sovereign-core/$SC/omega.lock" 28 serve "aien-sovereign-core/$SC/Cargo.lock" < : manifest that agrees with tree 54 cat > "$1" <