mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-25 02:30:27 +01:00
Set non-zero exit code if tests fail
This commit is contained in:
parent
98b42733fb
commit
7ac180d431
1 changed files with 3 additions and 4 deletions
|
@ -44,6 +44,7 @@ var Gut = load("res://addons/gut/gut.gd")
|
|||
var GutRunner = load("res://addons/gut/gui/GutRunner.tscn")
|
||||
|
||||
var json = JSON.new()
|
||||
var exit_code = 0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -390,15 +391,13 @@ func _on_tests_finished(should_exit, should_exit_on_success):
|
|||
set_exit_code(post_inst.get_exit_code())
|
||||
|
||||
if should_exit or (should_exit_on_success and _tester.get_fail_count() == 0):
|
||||
quit()
|
||||
quit(exit_code)
|
||||
else:
|
||||
print("Tests finished, exit manually")
|
||||
|
||||
|
||||
func set_exit_code(val):
|
||||
pass
|
||||
# OS.exit_code doesn't exist anymore, but when we find a solution it just
|
||||
# goes here.
|
||||
exit_code = val
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue