]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
exit with nonzero status if tests fail
authorBob Halley <halley@play-bow.org>
Sat, 9 Jan 2016 00:23:34 +0000 (16:23 -0800)
committerBob Halley <halley@play-bow.org>
Sat, 9 Jan 2016 00:23:34 +0000 (16:23 -0800)
tests/utest.py

index 32c1d753787530d5adeeb868d1be9dd40134f3a1..f3bfaa9a937a28b931050968114d538e85df64fe 100644 (file)
@@ -5,4 +5,6 @@ import unittest
 if __name__ == '__main__':
     sys.path.insert(0, os.path.realpath('..'))
     suites = unittest.defaultTestLoader.discover('.')
-    unittest.TextTestRunner(verbosity=2).run(suites)
+    if (not unittest.TextTestRunner(verbosity=2).run(suites).wasSuccessful()):
+        sys.exit(1)
+