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]>
15 lines
803 B
Bash
15 lines
803 B
Bash
#!/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
|