diff options
author | Seth Schoen <schoen@eff.org> | 2016-06-06 22:23:15 +0300 |
---|---|---|
committer | Seth Schoen <schoen@eff.org> | 2016-06-06 22:23:15 +0300 |
commit | 144dbdd90b0637777163597e338c4872c890e6e3 (patch) | |
tree | 1009b62c32c1fb0eb3960d6822964944a7a79fe5 /certbot-compatibility-test | |
parent | 4b79206d893cc53881d8fa9bdbfc3fdfe8b5892c (diff) |
Explain whether tests succeeded or failed overall
Diffstat (limited to 'certbot-compatibility-test')
-rw-r--r-- | certbot-compatibility-test/certbot_compatibility_test/test_driver.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/certbot-compatibility-test/certbot_compatibility_test/test_driver.py b/certbot-compatibility-test/certbot_compatibility_test/test_driver.py index 165791684..fae2ed2c7 100644 --- a/certbot-compatibility-test/certbot_compatibility_test/test_driver.py +++ b/certbot-compatibility-test/certbot_compatibility_test/test_driver.py @@ -7,6 +7,7 @@ import os import shutil import tempfile import time +import sys import OpenSSL @@ -341,6 +342,7 @@ def main(): temp_dir = tempfile.mkdtemp() plugin = PLUGINS[args.plugin](args) try: + overall_success = True while plugin.has_more_configs(): success = True @@ -359,10 +361,18 @@ def main(): if success: logger.info("All tests on %s succeeded", config) else: + overall_success = False logger.error("Tests on %s failed", config) finally: plugin.cleanup_from_tests() + if overall_success: + logger.warn("All compatibility tests succeeded") + sys.exit(0) + else: + logger.warn("One or more compatibility tests failed") + sys.exit(1) + if __name__ == "__main__": main() |