From f0e00ce971f46b72bee4fe2ec81c69ed45fc1683 Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Tue, 15 Aug 2017 19:41:45 +0200 Subject: [PATCH] bot tests: Make test-bots fail with proper exit code. Fixes #45. --- tools/test-bots | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/test-bots b/tools/test-bots index 10762b8..f4400ce 100755 --- a/tools/test-bots +++ b/tools/test-bots @@ -4,6 +4,7 @@ from os.path import dirname, basename from importlib import import_module import argparse import os +import sys import glob import unittest import logging @@ -75,7 +76,9 @@ def main(): suite = unittest.TestSuite(test_suites) runner = unittest.TextTestRunner(verbosity=2) - runner.run(suite) + result = runner.run(suite) + if result.failures or result.errors: + sys.exit(1) if __name__ == '__main__':