mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Explain whether tests succeeded or failed overall
This commit is contained in:
@@ -7,6 +7,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
import sys
|
||||||
|
|
||||||
import OpenSSL
|
import OpenSSL
|
||||||
|
|
||||||
@@ -341,6 +342,7 @@ def main():
|
|||||||
temp_dir = tempfile.mkdtemp()
|
temp_dir = tempfile.mkdtemp()
|
||||||
plugin = PLUGINS[args.plugin](args)
|
plugin = PLUGINS[args.plugin](args)
|
||||||
try:
|
try:
|
||||||
|
overall_success = True
|
||||||
while plugin.has_more_configs():
|
while plugin.has_more_configs():
|
||||||
success = True
|
success = True
|
||||||
|
|
||||||
@@ -359,10 +361,18 @@ def main():
|
|||||||
if success:
|
if success:
|
||||||
logger.info("All tests on %s succeeded", config)
|
logger.info("All tests on %s succeeded", config)
|
||||||
else:
|
else:
|
||||||
|
overall_success = False
|
||||||
logger.error("Tests on %s failed", config)
|
logger.error("Tests on %s failed", config)
|
||||||
finally:
|
finally:
|
||||||
plugin.cleanup_from_tests()
|
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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user