Exitcode != 0 for test errors to show a failed build in Travis

This commit is contained in:
baztian
2014-02-10 15:25:04 +01:00
parent caf68fa8af
commit 6160c27619
+7 -3
View File
@@ -29,7 +29,11 @@ def main():
runner = xmlrunner.XMLTestRunner(output='build/test-reports')
else:
runner = unittest2.TextTestRunner(verbosity=2)
runner.run(suite)
result = runner.run(suite)
if result.wasSuccessful():
return 0
else:
return 1
if __name__ == '__main__':
main()
sys.exit(main())