#!/usr/bin/env bash # Row 156 round 2 (sage-0942): busy check, the four changed test files singly, the 26 singles, then # all 36 mutants, on wt-c (70c9131f0 + r2) against build-manifest-r2. Stops at the first red step. set -uo pipefail R=$HOME/dewey-scratch/r156; cd "$R" || exit 2 export TMPDIR=$HOME/dewey-scratch/tmp/lt mkdir -p "$TMPDIR" || exit 2 M=$R/build-manifest-r2.sha256 "$HOME/dewey-scratch/busy.sh" || { echo "abort: busy"; exit 2; } (cd wt-c && sha256sum --quiet -c "$M") || { echo "abort: wt-c differs from the build manifest"; exit 2; } echo "start $(date -u +%FT%TZ) manifest $(sha256sum < "$M" | cut -d' ' -f1)" O=$R/touched-r2; rm -rf "$O"; mkdir -p "$O" || exit 2 red=0 for f in packages/bus/tests/land.test.mjs packages/harness/tests/runner.test.mjs packages/cli/tests/launcher.test.mjs packages/cli/tests/thread-launch.test.mjs; do log="$O/$(echo "$f" | tr '/' '%').log" (cd wt-c && setsid -w timeout -k 10 900 node --test --test-reporter=spec "$f" > "$log" 2>&1 < /dev/null); rc=$? echo "touched $f rc=$rc :: $(awk '/^ℹ (tests|pass|fail|cancelled|skipped) [0-9]+$/ {printf "%s %s ", $2, $3}' "$log")" grep -E '^✖ ' "$log" | sed 's/^/ /' | sort -u [ "$rc" -eq 0 ] || red=1 done awk '/^ℹ (tests|pass|fail|cancelled|skipped) [0-9]+$/ {s[$2]+=$3} END {printf "touched sum: tests %d pass %d fail %d cancelled %d skipped %d\n", s["tests"], s["pass"], s["fail"], s["cancelled"], s["skipped"]}' "$O"/*.log [ "$red" -eq 0 ] || { echo "stop: a touched file is red"; exit 1; } WT=wt-c MANIFEST="$M" SINGLES_OUT="$R/singles-r2" "$R/singles.sh" || { echo "stop: singles.sh exited $?"; exit 1; } grep -q '^sum: .* fail 0 cancelled 0 ' <(awk '/^ℹ (tests|pass|fail|cancelled|skipped) [0-9]+$/ {s[$2]+=$3} END {printf "sum: tests %d pass %d fail %d cancelled %d skipped %d\n", s["tests"], s["pass"], s["fail"], s["cancelled"], s["skipped"]}' "$R"/singles-r2/*.log) || { echo "stop: singles red"; exit 1; } setsid -w timeout -k 10 7200 "$R/mutants.sh" wt-c "$R/mutants-r2" "$M"; echo "mutants.sh rc=$?" (cd wt-c && sha256sum --quiet -c "$M") && echo "wt-c manifest OK at end" || echo "WT-C MANIFEST MISMATCH at end" echo "end $(date -u +%FT%TZ)"