test(agent-eval): restore the engine on INT/TERM too (CG-15)
Killing ab-new-vs-baseline.sh mid-baseline-arm left the engine checked out at the baseline ref with the post-baseline files deleted, so every later build in the working tree was silently the OLD code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
48a2309b92
commit
edce18f586
@@ -58,7 +58,9 @@ cleanup() {
|
|||||||
git -C "$ENGINE" checkout HEAD -- $CHANGED 2>/dev/null
|
git -C "$ENGINE" checkout HEAD -- $CHANGED 2>/dev/null
|
||||||
( cd "$ENGINE" && npm run build >/dev/null 2>&1 )
|
( cd "$ENGINE" && npm run build >/dev/null 2>&1 )
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
# INT/TERM too: killing the script mid-baseline-arm otherwise leaves the engine
|
||||||
|
# checked out at the baseline ref, which silently poisons every later build.
|
||||||
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
mkdir -p "$OUT"
|
mkdir -p "$OUT"
|
||||||
echo "###### engine=$ENGINE baseline=$BASE_REF"
|
echo "###### engine=$ENGINE baseline=$BASE_REF"
|
||||||
|
|||||||
Reference in New Issue
Block a user