summaryrefslogtreecommitdiffstats
path: root/iptables-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-09-06 13:49:34 +0200
committerPhil Sutter <phil@nwl.cc>2021-09-13 17:00:51 +0200
commit7559af835d8f58375f797f895e1a5410027127d9 (patch)
treee968dffb6683b923369521d5f0bbd5fe72ace562 /iptables-test.py
parentc057939d80cc6219a137784c195e14ee1bc62a58 (diff)
tests: iptables-test: Exit non-zero on error
If any test fails, return a non-zero exit code. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables-test.py')
-rwxr-xr-xiptables-test.py3
1 files changed, 2 insertions, 1 deletions
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())