summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Young <liam.young@canonical.com>2014-07-16 12:20:22 +0100
committerLiam Young <liam.young@canonical.com>2014-07-16 12:20:22 +0100
commit0524c20ed378adfdd1bcb82b344e8833a5325e4a (patch)
treecd24c166f4d6d01e49ef85976f228a05b4be197c
parent34b4110bc6007aac6b4b4b3a54333eaff26f24ec (diff)
downloadlogutils-0524c20ed378adfdd1bcb82b344e8833a5325e4a.tar.gz
Ensure that test failures result in a non-zero exit code.
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index b1b589e..e2911e8 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,9 @@ class TestCommand(distutils.core.Command):
import logutil_tests
loader = unittest.TestLoader()
runner = unittest.TextTestRunner()
- runner.run(loader.loadTestsFromModule(logutil_tests))
+ test_results = runner.run(loader.loadTestsFromModule(logutil_tests))
+ if not test_results.wasSuccessful():
+ sys.exit(1)
def initialize_options(self):
pass