aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/run-tests.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-14 22:11:42 -0500
committerCraig Jennings <c@cjennings.net>2026-06-14 22:11:42 -0500
commit18132bacf809c889f87fb0be56cf8c7d6a4e8638 (patch)
tree16b2dda2c3c1b9200ee5468db972eb53e6362433 /scripts/theme-studio/run-tests.sh
parent10dce4bc6762f30cc034d2d551c4eec8a989e550 (diff)
downloaddotemacs-18132bacf809c889f87fb0be56cf8c7d6a4e8638.tar.gz
dotemacs-18132bacf809c889f87fb0be56cf8c7d6a4e8638.zip
refactor(theme-studio): derive the gate list and sentinel the samples split
run-tests.sh built its browser-gate list by hand, so a new gate could go unrun or a removed one stay listed (that drift hid the #familytest alias). It now derives the list from the gate blocks in browser-gates.js. generate.py split samples.py on the first "cols=" substring to import only the data section, which would truncate at the wrong place if "cols=" ever appeared earlier. Both sides now use an explicit THEME_STUDIO_DATA_END marker.
Diffstat (limited to 'scripts/theme-studio/run-tests.sh')
-rwxr-xr-xscripts/theme-studio/run-tests.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/theme-studio/run-tests.sh b/scripts/theme-studio/run-tests.sh
index 2733b28d..6666fb0b 100755
--- a/scripts/theme-studio/run-tests.sh
+++ b/scripts/theme-studio/run-tests.sh
@@ -55,7 +55,9 @@ CHROME=""
for c in google-chrome-stable google-chrome chromium chromium-browser; do
if command -v "$c" >/dev/null 2>&1; then CHROME="$c"; break; fi
done
-HASHES="selftest cursortest readouttest deltatest oklchtest planetest locktest sorttest mocktest contrasttest safetest healtest columntest counttest baseedittest roundtriptest beveltest previewlinktest generatortest autodimtest"
+# Derive the gate list from the gate blocks themselves so it can't drift: a gate
+# added to browser-gates.js runs automatically, and one removed stops being run.
+HASHES="$(grep -oE "location\.hash==='#[a-z]+test'" browser-gates.js | sed -E "s/.*#([a-z]+test)'/\1/" | sort -u | tr '\n' ' ')"
if [ "$NO_BROWSER" = 1 ]; then
skip_msg "browser hash gates (--no-browser)"
elif [ -z "$CHROME" ]; then