mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-10 04:40:25 +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 GutRunner = load("res://addons/gut/gui/GutRunner.tscn")
|
||||||
|
|
||||||
var json = JSON.new()
|
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())
|
set_exit_code(post_inst.get_exit_code())
|
||||||
|
|
||||||
if should_exit or (should_exit_on_success and _tester.get_fail_count() == 0):
|
if should_exit or (should_exit_on_success and _tester.get_fail_count() == 0):
|
||||||
quit()
|
quit(exit_code)
|
||||||
else:
|
else:
|
||||||
print("Tests finished, exit manually")
|
print("Tests finished, exit manually")
|
||||||
|
|
||||||
|
|
||||||
func set_exit_code(val):
|
func set_exit_code(val):
|
||||||
pass
|
exit_code = val
|
||||||
# OS.exit_code doesn't exist anymore, but when we find a solution it just
|
|
||||||
# goes here.
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue