Skip to content

Commit

Permalink
issue #59: play auto-test can return an exit code of zero when the te…
Browse files Browse the repository at this point in the history
…sts do not run
  • Loading branch information
Todd Stedman committed Dec 28, 2022
1 parent 557a968 commit 5a1ecb0
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 5a1ecb0

Please sign in to comment.