From 5a1ecb0f0404e63e86ec7f22f7a3a50b6b17b7b0 Mon Sep 17 00:00:00 2001 From: Todd Stedman Date: Wed, 28 Dec 2022 14:26:12 -0800 Subject: [PATCH] issue #59: play auto-test can return an exit code of zero when the tests do not run --- framework/pym/play/commands/autotest.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/pym/play/commands/autotest.py b/framework/pym/play/commands/autotest.py index 22702c8e36..403a7a1b5f 100644 --- a/framework/pym/play/commands/autotest.py +++ b/framework/pym/play/commands/autotest.py @@ -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)