test(validation): --gui option to run the suite in the GUI

Adds `--gui` to test/validation/run.sh: drops `-b` so testium opens the GUI
with the validation suite loaded instead of running headless. The run is
started manually and the window stays open — handy to inspect the test
tree, try the Ctrl+F search, etc. Works with any --mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 00:25:53 +02:00
parent cf5db9e112
commit 6dc473de41

View File

@@ -3,11 +3,15 @@
# testium (source, wheel, pyinstaller, flatpak, appimage). # testium (source, wheel, pyinstaller, flatpak, appimage).
# #
# Usage: # Usage:
# ./test/validation/run.sh [clean] [--mode MODE] [extra testium args] # ./test/validation/run.sh [clean] [--mode MODE] [--gui] [extra testium args]
# #
# clean remove the validation venv before recreating it # clean remove the validation venv before recreating it
# (must be the first argument; useful after a Python upgrade) # (must be the first argument; useful after a Python upgrade)
# #
# --gui open the GUI with the suite loaded instead of running in
# batch; run it manually from the window, which stays open
# (handy to inspect the tree, try the Ctrl+F search, ...)
#
# --mode MODE which testium build to validate. One of: # --mode MODE which testium build to validate. One of:
# source (default) src/testium via project run.sh # source (default) src/testium via project run.sh
# wheel dist/testium-<v>-py3-none-any.whl # wheel dist/testium-<v>-py3-none-any.whl
@@ -45,6 +49,8 @@ else
fi fi
EXTRA=() EXTRA=()
RUN_FLAGS=(-b) # batch by default; --gui opens the GUI and stays open
GUI=0
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
--mode) --mode)
@@ -55,6 +61,11 @@ while [ $# -gt 0 ]; do
MODE="${1#--mode=}" MODE="${1#--mode=}"
shift shift
;; ;;
--gui)
GUI=1
RUN_FLAGS=() # no -b: launch the GUI with the suite loaded,
shift # run it manually; the window does not auto-close
;;
*) *)
EXTRA+=("$1") EXTRA+=("$1")
shift shift
@@ -147,7 +158,11 @@ echo "-- launch: ${CMD[*]}"
echo "-- LSP check ($MODE)" echo "-- LSP check ($MODE)"
"$VENV_PYTHON" "$SCRIPT_DIR/lsp_check.py" "${CMD[@]}" "$VENV_PYTHON" "$SCRIPT_DIR/lsp_check.py" "${CMD[@]}"
exec "${CMD[@]}" -b \ if [ "$GUI" -eq 1 ]; then
echo "-- GUI mode: the suite is loaded; press Start to run. Window stays open."
fi
exec "${CMD[@]}" "${RUN_FLAGS[@]}" \
-d "python_bin=$VENV_PYTHON" \ -d "python_bin=$VENV_PYTHON" \
-d "validation_report_file=validation-$MODE" \ -d "validation_report_file=validation-$MODE" \
-- "$SCRIPT_DIR/main.tum" "${EXTRA[@]}" -- "$SCRIPT_DIR/main.tum" "${EXTRA[@]}"