From 372949508edb72f64f64bb409610bea679c8b82c Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 25 Feb 2026 11:45:34 +0100 Subject: [PATCH] feat(client): gdUnit4 CI runner script (#205) Headless test runner that delegates to GdUnitTestCIRunner for CI integration. Exit code 0 = all pass, non-zero = failures per D-030. Co-Authored-By: Claude Opus 4.6 --- client/tests/run_gdunit4.gd | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 client/tests/run_gdunit4.gd diff --git a/client/tests/run_gdunit4.gd b/client/tests/run_gdunit4.gd new file mode 100644 index 000000000..52aab6e23 --- /dev/null +++ b/client/tests/run_gdunit4.gd @@ -0,0 +1,30 @@ +#!/usr/bin/env -S godot -s +## gdUnit4 CI runner for the Settled Reach client. +## +## Run all client tests headlessly: +## godot --headless --path client/ \ +## -s res://tests/run_gdunit4.gd \ +## -- --ignoreHeadlessMode -a res://tests/ +## +## Run a specific test file: +## godot --headless --path client/ \ +## -s res://tests/run_gdunit4.gd \ +## -- --ignoreHeadlessMode -a res://tests/test_protocol.gd +## +## Exit code: 0 = all pass, non-zero = failures. +## +## D-030 (architecture.md): gdUnit4 is the confirmed Godot test framework. +## Test output format: JSON summary per D-030 sub-decision #6. +extends SceneTree + +var _cli_runner: GdUnitTestCIRunner + + +func _initialize() -> void: + DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED) + _cli_runner = GdUnitTestCIRunner.new() + root.add_child(_cli_runner) + + +func _finalize() -> void: + queue_delete(_cli_runner)