#!/usr/bin/env bash # Row 156 singles (slot work, only on Sage's go): each listed test file alone on wt, checked against the build manifest. set -uo pipefail R=$HOME/dewey-scratch/r156; cd "$R" || exit 2 W=${WT:-wt}; [ -d "$W" ] || { echo "abort: no tree $W"; exit 2; }; echo "tree $W at $(git -C "$W" rev-parse HEAD)" export TMPDIR=$HOME/dewey-scratch/tmp/lt mkdir -p "$TMPDIR" || exit 2 "$HOME/dewey-scratch/busy.sh" || { echo "abort: busy"; exit 2; } M=${MANIFEST:-$R/build-manifest.sha256} (cd "$W" && sha256sum --quiet -c "$M") || { echo "abort: wt differs from the build manifest"; exit 2; } echo "start $(date -u +%FT%TZ) manifest $(sha256sum < "$M" | cut -d' ' -f1)" O=${SINGLES_OUT:-$R/singles}; rm -rf "$O"; mkdir -p "$O" || exit 2 while read -r f; do log="$O/$(echo "$f" | tr '/' '%').log" (cd "$W" && setsid -w timeout -k 10 900 node --test --test-reporter=spec "$f" > "$log" 2>&1 < /dev/null); rc=$? echo "test $f rc=$rc :: $(awk '/^ℹ (tests|pass|fail|cancelled|skipped) [0-9]+$/ {printf "%s %s ", $2, $3}' "$log")" grep -E '^✖ ' "$log" | sed 's/^/ /' | sort -u done < "$R/files.txt" echo "files: $(wc -l < "$R/files.txt")" 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"]}' "$O"/*.log (cd "$W" && sha256sum --quiet -c "$M") && echo "wt manifest OK at end" || echo "WT MANIFEST MISMATCH at end" echo "end $(date -u +%FT%TZ)"