#!/usr/bin/env bash # Run the six real-click browser checks of check_ttt.mjs over the stored tic-tac-toe workspaces (needs Node + Playwright + Chromium in PLAYWRIGHT_DIR; # the server has none, so run this on a machine that has them, over a copy of the runs). Prints one line per cell: variant, repeat, checks passed. # # PLAYWRIGHT_DIR=/path/with/node_modules bash browser_check_ttt.sh RUNS_ROOT set -uo pipefail RUNS=${1:?runs root} PW=${PLAYWRIGHT_DIR:?directory with node_modules/playwright} HERE=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CHECK=$HERE/../tasks/ttt/hidden/check_ttt.mjs for ws in "$RUNS"/V?/ttt-r*/workspace; do [ -f "$ws/index.html" ] || continue cell=$(dirname "$ws") out=$(cd "$PW" && node "$CHECK" "$ws/index.html" 2>&1 | tail -1) echo "$(basename "$(dirname "$cell")") $(basename "$cell") $out" | tee -a "$RUNS/_index/browser-check-ttt.txt" done