Rev 190: Return exit code nonzero if tests fail. (Jelmer, bug #740109) in http://bazaar.launchpad.net/%2Bbranch/meliae

John Arbash Meinel john at arbash-meinel.com
Tue Mar 22 11:19:33 UTC 2011


At http://bazaar.launchpad.net/%2Bbranch/meliae

------------------------------------------------------------
revno: 190 [merge]
revision-id: john at arbash-meinel.com-20110322111922-xwungkfqr0wo2pc5
parent: john at arbash-meinel.com-20110322104910-81h68865abcpr111
parent: jelmer at samba.org-20110322110525-acvjsbtsnlbhp1v1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: meliae
timestamp: Tue 2011-03-22 12:19:22 +0100
message:
  Return exit code nonzero if tests fail. (Jelmer, bug #740109)
modified:
  CHANGES.txt                    changes.txt-20100104131503-ipkk7tyh2bnv0lu4-1
  meliae/tests/__init__.py       __init__.py-20090401185017-cy1sj2rnyn6z7haz-6
-------------- next part --------------
=== modified file 'CHANGES.txt'
--- a/CHANGES.txt	2011-03-22 10:49:10 +0000
+++ b/CHANGES.txt	2011-03-22 11:19:22 +0000
@@ -39,6 +39,10 @@
   accounting for alignment effects on 64-bit machines.
   (John Arbash Meinel, Jelmer Vernooij, #739310)
 
+* ``run_tests.py`` exits nonzero if a test fails.
+  (Jelmer Vernooij, #740109)
+
+
 Meliae 0.3
 ##########
 

=== modified file 'meliae/tests/__init__.py'
--- a/meliae/tests/__init__.py	2009-10-27 14:57:31 +0000
+++ b/meliae/tests/__init__.py	2011-03-22 11:19:22 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Canonical Ltd
+# Copyright (C) 2009, 2011 Canonical Ltd
 # 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 3 as
@@ -26,7 +26,8 @@
         verbosity = 1
     runner = unittest.TextTestRunner(verbosity=verbosity)
     suite = test_suite()
-    return runner.run(suite)
+    result = runner.run(suite)
+    return result.wasSuccessful()
 
 
 def test_suite():



More information about the bazaar-commits mailing list