Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions itest/godot/TestRunner.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ extends Node
class_name GDScriptTestRunner

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

# Ensure physics is initialized, for tests that require it.
Expand Down
Loading