Skip to content

Commit

Permalink
Fix exit status of the test run script
Browse files Browse the repository at this point in the history
Change-Id: I145bbc869a5387872ee366cc496a06dfc72aee57
  • Loading branch information
Vespian committed Jan 1, 2015
1 parent d442b6f commit 0677356
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Pawel Rozlach
# Copyright (c) 2013 Pawel Rozlach
# Copyright (c) 2013 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -42,11 +40,16 @@ def main():
loader = unittest.TestLoader()
tests = loader.discover('./test/')
testRunner = unittest.runner.TextTestRunner(descriptions=True, verbosity=1)
testRunner.run(tests)
res = testRunner.run(tests)

if "coverage" in sys.modules:
cov.stop()
cov.html_report()

if res.wasSuccessful():
sys.exit(0)
else:
sys.exit(1)

if __name__ == '__main__':
main()

0 comments on commit 0677356

Please sign in to comment.