]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
tests: iptables-test: Exit non-zero on error
authorPhil Sutter <phil@nwl.cc>
Mon, 6 Sep 2021 11:49:34 +0000 (13:49 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 13 Sep 2021 15:00:51 +0000 (17:00 +0200)
If any test fails, return a non-zero exit code.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables-test.py

index 1790da3d0b0748e7d8a44f39be1718969b053457..5eafe5896414b21eeeb90b6499fda32a6f8ff3d5 100755 (executable)
@@ -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())