aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/run-tests.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 07:53:12 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 07:53:12 -0500
commitb6b5a9b7cf95030c767ec618e0cd2df73783a21b (patch)
tree1646f78dc1e51cc35d0ad0a680c3729bc8dcfcd7 /scripts/theme-studio/run-tests.sh
parent092a2312a1d2fa1364b1d5cb9c2d71a8aefaeb8e (diff)
downloaddotemacs-b6b5a9b7cf95030c767ec618e0cd2df73783a21b.tar.gz
dotemacs-b6b5a9b7cf95030c767ec618e0cd2df73783a21b.zip
build(theme-studio): add a local Makefile; root delegates test + coverage
theme-studio is a self-contained Python + JS subproject with its own toolchain (python3, node, uvx, headless Chrome), unrelated to the root Makefile's Elisp/ERT world. Gave it a local Makefile that owns that toolchain — test, check (fast, no browser), coverage, gen, open — so the build logic lives with the code and the short target names don't collide with the root's Elisp-flavored test/coverage. The root keeps the discoverable entry points: theme-studio-test and a new theme-studio-coverage now delegate via make -C. run-tests.sh grows a --no-browser flag so `make check` can skip the headless-Chrome gates for a fast inner loop. gen/open take an optional SEED to view a specific palette. coverage reports both halves: node --experimental-test-coverage for the three JS modules (all 100% line, ~96% branch) and uvx coverage for generate.py (89% lines; the rest is the __main__ writer and the optional seed-env branch).
Diffstat (limited to 'scripts/theme-studio/run-tests.sh')
-rwxr-xr-xscripts/theme-studio/run-tests.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/theme-studio/run-tests.sh b/scripts/theme-studio/run-tests.sh
index d57f0044..42d24960 100755
--- a/scripts/theme-studio/run-tests.sh
+++ b/scripts/theme-studio/run-tests.sh
@@ -16,6 +16,10 @@ set -uo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$HERE"
+# --no-browser skips the headless-Chrome hash gates for a fast inner loop.
+NO_BROWSER=0
+[ "${1:-}" = "--no-browser" ] && NO_BROWSER=1
+
fail=0
pass_msg() { printf ' PASS %s\n' "$1"; }
fail_msg() { printf ' FAIL %s\n' "$1"; fail=1; }
@@ -50,7 +54,9 @@ 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"
-if [ -z "$CHROME" ]; then
+if [ "$NO_BROWSER" = 1 ]; then
+ skip_msg "browser hash gates (--no-browser)"
+elif [ -z "$CHROME" ]; then
for t in $HASHES; do skip_msg "#$t (no Chromium-family browser found)"; done
else
PROF="$(mktemp -d)"