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

master
baztian 2014-02-10 15:25:04 +01:00
parent caf68fa8af
commit 6160c27619
1 changed files with 7 additions and 3 deletions

10
test.py
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())