changeset 571:f3e5ef8760cb

tests.run: exit nonzero if tests did not pass
author Augie Fackler <durin42@gmail.com>
date Mon, 01 Mar 2010 17:45:00 -0600
parents 880ef2ac1e0d
children 7f0e8fd6ee22
files tests/run.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run.py
+++ b/tests/run.py
@@ -64,4 +64,6 @@ if __name__ == '__main__':
                 suite.append(all[arg].suite())
 
     runner = unittest.TextTestRunner(**kwargs)
-    runner.run(unittest.TestSuite(suite))
+    result = runner.run(unittest.TestSuite(suite))
+    if not result.wasSuccessful():
+        sys.exit(1)