From: Phil Sutter Date: Mon, 6 Sep 2021 11:49:34 +0000 (+0200) Subject: tests: iptables-test: Exit non-zero on error X-Git-Tag: v1.8.8~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7559af835d8f58375f797f895e1a5410027127d9;p=thirdparty%2Fiptables.git tests: iptables-test: Exit non-zero on error If any test fails, return a non-zero exit code. Signed-off-by: Phil Sutter --- diff --git a/iptables-test.py b/iptables-test.py index 1790da3d..5eafe589 100755 --- a/iptables-test.py +++ b/iptables-test.py @@ -408,7 +408,8 @@ def main(): test_files += 1 print("%d test files, %d unit tests, %d passed" % (test_files, tests, passed)) + return passed - tests if __name__ == '__main__': - main() + sys.exit(main())