File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 22# License, v. 2.0. If a copy of the MPL was not distributed with this
33# file, You can obtain one at https://mozilla.org/MPL/2.0/.
44
5+ @tool # To ensure that itest is not run from the editor; see below.
6+
57extends Node
68class_name GDScriptTestRunner
79
810func _ready ():
11+ # Check that tests are invoked from the command line. Loading the editor may break some parts (e.g. generated test code).
12+ # Both checks are needed (it's possible to invoke `godot -e --headless`).
13+ if Engine .is_editor_hint () || DisplayServer .get_name () != 'headless' :
14+ push_error ("Integration tests must be run in headless mode (without editor)." )
15+ get_tree ().quit (2 )
16+ return
17+
918 # Ensure physics is initialized, for tests that require it.
1019 await get_tree ().physics_frame
1120
You can’t perform that action at this time.
0 commit comments