Skip to content

Commit 0677356

Browse files
author
Vespian
committed
Fix exit status of the test run script
Change-Id: I145bbc869a5387872ee366cc496a06dfc72aee57
1 parent d442b6f commit 0677356

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

run_tests.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
# Copyright (c) 2014 Pawel Rozlach
4-
# Copyright (c) 2013 Pawel Rozlach
2+
# Copyright (c) 2013 Spotify AB
53
#
64
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
75
# use this file except in compliance with the License. You may obtain a copy of
@@ -42,11 +40,16 @@ def main():
4240
loader = unittest.TestLoader()
4341
tests = loader.discover('./test/')
4442
testRunner = unittest.runner.TextTestRunner(descriptions=True, verbosity=1)
45-
testRunner.run(tests)
43+
res = testRunner.run(tests)
4644

4745
if "coverage" in sys.modules:
4846
cov.stop()
4947
cov.html_report()
5048

49+
if res.wasSuccessful():
50+
sys.exit(0)
51+
else:
52+
sys.exit(1)
53+
5154
if __name__ == '__main__':
5255
main()

0 commit comments

Comments
 (0)