mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 16:56:30 -06:00
Spit out an exit code when running the regression tests.
This commit is contained in:
parent
a914ea088c
commit
9aa479ea2e
@ -227,6 +227,9 @@ class StreamToLogger(object):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# Failure detected?
|
||||||
|
failure = False
|
||||||
|
|
||||||
test_result = dict()
|
test_result = dict()
|
||||||
# Register cleanup function to cleanup on exit
|
# Register cleanup function to cleanup on exit
|
||||||
atexit.register(drop_objects)
|
atexit.register(drop_objects)
|
||||||
@ -276,6 +279,10 @@ if __name__ == '__main__':
|
|||||||
get_tests_result(tests)
|
get_tests_result(tests)
|
||||||
test_result[server['name']] = [ran_tests, failed_cases,
|
test_result[server['name']] = [ran_tests, failed_cases,
|
||||||
skipped_cases]
|
skipped_cases]
|
||||||
|
|
||||||
|
if len(failed_cases) > 0:
|
||||||
|
failure = True
|
||||||
|
|
||||||
# Delete test server
|
# Delete test server
|
||||||
# test_utils.delete_test_server(test_client)
|
# test_utils.delete_test_server(test_client)
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
@ -311,3 +318,8 @@ if __name__ == '__main__':
|
|||||||
"===\n", file=sys.stderr)
|
"===\n", file=sys.stderr)
|
||||||
|
|
||||||
print("Please check output in file: %s/regression.log\n" % CURRENT_PATH)
|
print("Please check output in file: %s/regression.log\n" % CURRENT_PATH)
|
||||||
|
|
||||||
|
if failure == True:
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
sys.exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user