diff --git a/tester.py b/tester.py index 84d639b6f8890e9ffaccbe4c8778cc2f4a4dd5bf..f9b6c578e9726f6553a63abc19e9d3e25c44ff46 100755 --- a/tester.py +++ b/tester.py @@ -29,6 +29,7 @@ class Logger(object): def flush(self): pass + log_buffer = StringIO() sys.stdout = Logger(sys.stdout, log_buffer) sys.stderr = sys.stdout @@ -194,6 +195,8 @@ class Tester(): successes += 1 elif p.returncode == 2: status = '\033[94mnot testable\033[0m' + elif p.returncode == 3: + status = '\033[93mwarning\033[0m' else: status = '\033[91mfailure\033[0m' failures += 1 diff --git a/tests/test_ssl.py b/tests/test_ssl.py index 9e66764da523c36207ab17871ee2e5a793ca09da..ea1fddf69a3ee114c646a0abfc61f8267d15d0ec 100755 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -43,4 +43,7 @@ for s in conf_servers: except requests.exceptions.SSLError: print('%sSSL certificate for %s is not valid%s' % (RED, url, DEF)) all_ok = False -sys.exit(int(not all_ok)) +if not all_ok: + sys.exit(3) +else: + sys.exit(0)