From 2be60fae33ccb30a7213bd56b9d2852065bdf41c Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Sun, 12 Jan 2014 11:08:06 +0100 Subject: [PATCH] Returns exit code 1 if at least one test failed. It should make travis-ci to report test failures when they actually fail. Ie. build 169.1 has test failures, but build was happily reported as Passed, this patch should change this. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 134d6f916..00a72b406 100755 --- a/setup.py +++ b/setup.py @@ -99,7 +99,9 @@ class picard_test(Command): tests = unittest.defaultTestLoader.loadTestsFromNames(names) t = unittest.TextTestRunner(verbosity=self.verbosity) - t.run(tests) + testresult = t.run(tests) + if not testresult.wasSuccessful(): + raise SystemExit("At least one test failed.") class picard_build_locales(Command):