Skip to content

Commit

Permalink
Return exit code nonzero if tests fail. (Jelmer, bug #740109)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameinel committed Mar 22, 2011
2 parents 002e408 + f0197ac commit 0cea5e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Meliae 0.4
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
##########

Expand Down
5 changes: 3 additions & 2 deletions meliae/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -26,7 +26,8 @@ def run_suite(verbose=False):
verbosity = 1
runner = unittest.TextTestRunner(verbosity=verbosity)
suite = test_suite()
return runner.run(suite)
result = runner.run(suite)
return result.wasSuccessful()


def test_suite():
Expand Down

0 comments on commit 0cea5e1

Please sign in to comment.