Files
stack/agents/darkwing/work/queue-48-review/r1/mut/run.sh
T
2026-10-10 03:49:12 -05:00

24 lines
1.6 KiB
Bash
Executable File
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
# Runs after the gate: commit.test variants, then test-task with the fake docker.
export TMPDIR=~/darkwing-scratch/r48a/tmp
R=~/darkwing-scratch/r48a; M=$R/mut; W=$R/wt2
: > $M/summary.txt
echo "start $(date -u +%FT%TZ)" >> $M/summary.txt
for v in delay-exit delay-close; do
(cd $W && git checkout -q -- packages/queue/tests/commit.test.mjs && cp $R/snap/packages/queue/tests/commit.test.mjs packages/queue/tests/ && python3 $M/mutate.py $v && git diff -- packages/queue/tests/commit.test.mjs > $M/$v.diff)
(cd $W && node --test --test-name-pattern="F1: a" packages/queue/tests/commit.test.mjs > $M/$v.txt 2>&1); e=$?
echo "$v exit=$e $(grep -E '^ℹ (pass|fail)' $M/$v.txt | tr '\n' ' ')" >> $M/summary.txt
done
(cd $W && cp $R/snap/packages/queue/tests/commit.test.mjs packages/queue/tests/)
# The candidate's paused-commit tests, unmodified, ten times in a row.
for i in $(seq 1 10); do
(cd $W && node --test --test-name-pattern="F1: a" packages/queue/tests/commit.test.mjs > $M/repeat-$i.txt 2>&1); e=$?
echo "repeat-$i exit=$e $(grep -E '^ℹ (pass|fail)' $M/repeat-$i.txt | tr '\n' ' ')" >> $M/summary.txt
done
# test-task with docker info answering yes and the daemon unreachable.
(cd $W && DOCKER_HOST=unix:///nonexistent.sock PATH=$R/fakebin:$PATH scripts/test-task.sh > $M/test-task-fakedocker.txt 2>&1); e=$?
echo "test-task-fakedocker exit=$e $(grep -E 'passed, [0-9]+ failed' $M/test-task-fakedocker.txt | tail -1)" >> $M/summary.txt
(cd $W && sha256sum -c $R/manifest-mine.sha256) > $M/manifest-after.txt 2>&1
echo "end $(date -u +%FT%TZ)" >> $M/summary.txt
echo DONE >> $M/summary.txt