Skip to content

Commit 6a01f75

Browse files
authored
Merge pull request #1379 from godot-rust/qol/editor-itest
Allow opening itests in editor
2 parents 8f92a08 + ffcfcab commit 6a01f75

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

itest/godot/TestRunner.gd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ extends Node
99
class_name GDScriptTestRunner
1010

1111
func _ready():
12-
# Check that tests are invoked from the command line. Loading the editor may break some parts (e.g. generated test code).
13-
# Both checks are needed (it's possible to invoke `godot -e --headless`).
14-
if Engine.is_editor_hint() || DisplayServer.get_name() != 'headless':
15-
push_error("Integration tests must be run in headless mode (without editor).")
16-
get_tree().quit(2)
12+
# Don't run tests when opened in the editor.
13+
if Engine.is_editor_hint():
14+
if DisplayServer.get_name() == 'headless':
15+
push_error("Opening itest in editor in headless mode is not supported.")
16+
get_tree().quit(2)
1717
return
1818

1919
# Ensure physics is initialized, for tests that require it.

0 commit comments

Comments
 (0)