Skip to content

Commit

Permalink
Merge pull request #1435 from tstedman/issue_59_auto_test_return_0_on…
Browse files Browse the repository at this point in the history
…_failure

issue #59: play auto-test can return an exit code of zero when the te…
  • Loading branch information
xael-fry committed Jul 15, 2023
2 parents ccd502d + 5a1ecb0 commit f8812ce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion framework/pym/play/commands/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,20 @@ def autotest(app, args):
opener.open('%s://localhost:%s/@kill' % (protocol, http_port))
except Exception as e:
pass


testCompleted = False
if os.path.exists(os.path.join(app.path, 'test-result/result.passed')):
testCompleted = True
print("~ All tests passed")
print("~")
testspassed = True
if os.path.exists(os.path.join(app.path, 'test-result/result.failed')):
testCompleted = True
print("~ Some tests have failed. See file://%s for results" % test_result)
print("~")
sys.exit(1)

if not testCompleted:
print("~ Tests did not successfully complete.")
print("~")
sys.exit(-1)

0 comments on commit f8812ce

Please sign in to comment.