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.
This commit is contained in:
Laurent Monin
2014-01-12 11:08:06 +01:00
parent 0f9b04324c
commit 2be60fae33

View File

@@ -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):