Skip to content

Commit

Permalink
Merge pull request #9 from caryoscelus/master
Browse files Browse the repository at this point in the history
Fix command line parser and return non-zero exit code on test failure
  • Loading branch information
bitwes authored Aug 30, 2016
2 parents edf2bc8 + 9ca4033 commit a30238d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/gut/gut_cmdln.gd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CmdLineParser:

func _init():
for i in range(OS.get_cmdline_args().size()):
_opts.append(OS.get_cmdline_args().get(i))
_opts.append(OS.get_cmdline_args()[i])

# Search _opts for an element that starts with the option name
# specified.
Expand Down Expand Up @@ -339,4 +339,8 @@ func _init():
# exit if option is set.
func _on_tests_finished():
if(options.should_exit):
quit()
if(_tester._summary.failed>0):
# kill self => return non-zero exit code
OS.kill(OS.get_process_ID())
else:
quit()

0 comments on commit a30238d

Please sign in to comment.