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:
@@ -3,11 +3,15 @@
|
||||
# testium (source, wheel, pyinstaller, flatpak, appimage).
|
||||
#
|
||||
# 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
|
||||
# (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:
|
||||
# source (default) src/testium via project run.sh
|
||||
# wheel dist/testium-<v>-py3-none-any.whl
|
||||
@@ -45,6 +49,8 @@ else
|
||||
fi
|
||||
|
||||
EXTRA=()
|
||||
RUN_FLAGS=(-b) # batch by default; --gui opens the GUI and stays open
|
||||
GUI=0
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--mode)
|
||||
@@ -55,6 +61,11 @@ while [ $# -gt 0 ]; do
|
||||
MODE="${1#--mode=}"
|
||||
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")
|
||||
shift
|
||||
@@ -147,7 +158,11 @@ echo "-- launch: ${CMD[*]}"
|
||||
echo "-- LSP check ($MODE)"
|
||||
"$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 "validation_report_file=validation-$MODE" \
|
||||
-- "$SCRIPT_DIR/main.tum" "${EXTRA[@]}"
|
||||
|
||||
Reference in New Issue
Block a user