Add a WSL path to the test runner
run_tests.sh only knew one way to reach a Godot: `proot-distro login ubuntu` and the arm64 build at /root. On WSL there is no container and no arm64 binary, so the suite could not be run from a desktop at all. The platform is detected from /proc/version, and decides two things. Which Godot: on WSL a Linux `godot` on PATH if there is one, otherwise the newest Windows build already sitting on /mnt/c - the *_console.exe specifically, since the plain .exe is a GUI-subsystem binary that detaches from the terminal and would leave every test log empty. And whether to copy the project first: that copy exists to get off Android's FUSE bridge, and a Windows Godot already reads C: natively, so WSL runs in place. _run_inside.sh now takes the binary as its first argument instead of hardcoding it, and run_tests.sh calls it directly where there is no container to enter. The scheduling, timeouts and verdicts are unchanged and shared by both paths. 120/120 on WSL in 48s with JOBS=6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
6616952660
commit
b1d179ec9c
3 changed files with 87 additions and 16 deletions
|
|
@ -1,15 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Runs INSIDE the proot-distro Ubuntu container - do not call this directly,
|
||||
# call tests/run_tests.sh from Termux instead.
|
||||
# The half of the runner that actually runs Godot - do not call this
|
||||
# directly, call tests/run_tests.sh instead.
|
||||
#
|
||||
# It exists as its own file so the whole suite runs in ONE `proot-distro
|
||||
# login`: entering the container costs ~0.5s, which used to be paid 38 times
|
||||
# over. Everything below is the container-side half of the runner.
|
||||
# On Termux it runs INSIDE the proot-distro Ubuntu container. It exists as
|
||||
# its own file so the whole suite runs in ONE `proot-distro login`: entering
|
||||
# the container costs ~0.5s, which used to be paid 38 times over. On WSL
|
||||
# there is no container to enter and run_tests.sh calls it directly - the
|
||||
# scheduling, timeouts and verdicts below are the same either way, which is
|
||||
# why the Godot binary arrives as an argument rather than being hardcoded.
|
||||
#
|
||||
# Args: <project_dir> <jobs> <verbose> <test_file_name>...
|
||||
# Args: <godot_bin> <project_dir> <jobs> <verbose> <test_file_name>...
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
GODOT_BIN="$1"; shift
|
||||
PROJECT_DIR="$1"; shift
|
||||
JOBS="$1"; shift
|
||||
VERBOSE="$1"; shift
|
||||
|
|
@ -19,7 +23,6 @@ VERBOSE="$1"; shift
|
|||
# rather than making the suite look hung. Override for deliberate long runs.
|
||||
TEST_TIMEOUT_SECONDS="${TEST_TIMEOUT_SECONDS:-120}"
|
||||
|
||||
GODOT_BIN="/root/Godot_v4.7.1-stable_linux.arm64"
|
||||
cd "$PROJECT_DIR" || exit 2
|
||||
|
||||
tests=("$@")
|
||||
|
|
|
|||
Loading…
Reference in a new issue