Files
stack/agents/darkwing/work/s40-review/mut/run.sh
T
jason.woltjeandClaude Opus 5.5 c31bb13d1e docs(review): row 40 slice 1 S5 round 2 review, changes (darkwing)
Candidate 5cbf22c0, comment 27001 on #1522. T1 blocks: the terminal's
input hold is drained by an earlier chunk's run, so text typed after
Ctrl-G then Ctrl-T is refused and cleared. Suites, probes and 16 mutants
(13 killed; the 3 survivors checked by hand) in the packet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 20:48:54 -05:00

15 lines
803 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# run.sh <mutant> <pkg>: back up, mutate, run the package's node suite, restore from the backup.
set -u
cd ~/darkwing-scratch/r40/wt
export TMPDIR=~/darkwing-scratch/tmp
m=$1; p=$2
f=$(python3 -c "import sys; sys.argv=['x','$m']; exec(open('../mut/mutate.py').read().split('f, old, new')[0]); print(M['$m'][0])")
cp -p "$f" ../mut/bak/current
python3 ../mut/mutate.py "$m" >/dev/null || { cp -p ../mut/bak/current "$f"; echo "$m: no match" | tee -a ../mut/summary.txt; exit 1; }
out=../mut/$m-$p.txt
timeout 600 node --test "packages/$p/tests/*.test.mjs" > "$out" 2>&1; rc=$?
cp -p ../mut/bak/current "$f"
pass=$(grep -E '^ℹ pass' "$out" | awk '{print $3}'); fail=$(grep -E '^ℹ fail' "$out" | awk '{print $3}')
echo "$m ($f): $p rc $rc pass $pass fail $fail" | tee -a ../mut/summary.txt