diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2013-05-03 10:12:56 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2013-05-03 10:12:56 +0200 |
commit | 7841bf3a0076db1a273f0b1efeb78670c9e5a1fd (patch) | |
tree | a63e1063ad1cc472e2bbe1a23f2c2417548b8056 | |
parent | 38ffc7c48aafa5eb687b31879272deffda4bd959 (diff) |
Interrupt "make check" if errors occurs during python tests
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
-rw-r--r-- | python/evemu/testing/runner.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/evemu/testing/runner.py b/python/evemu/testing/runner.py index d7bf814..324c0fd 100644 --- a/python/evemu/testing/runner.py +++ b/python/evemu/testing/runner.py @@ -56,8 +56,11 @@ def get_runner(): def run_tests(): loader = unittest.TestLoader() suite = get_suite(loader, get_test_directory()) - get_runner().run(suite) + return get_runner().run(suite) if __name__ == "__main__": - run_tests() + import sys + result = run_tests() + if not result.wasSuccessful(): + sys.exit(1) |