summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2010-01-03 18:57:15 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2010-01-03 18:57:15 +0000
commit07fa03dde4b027f9add2735f2c12907894631318 (patch)
tree525168c7d959164bfd9d45293058b1ada0a14218
parentf68607508380a176aa612c1928ee0a5acb635624 (diff)
[1.1.X] Fixed #11615 -- Changed test runners to use an exit status code of 1 for any number of failed tests. The previous behavior of using an exit status code equal to the number of failed tests produced incorrect exit status codes when the number of test failures was 256 or greater. Thanks to lamby for the report and patch.
Backport of r12068 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/test.py2
-rwxr-xr-xtests/runtests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/commands/test.py b/django/core/management/commands/test.py
index 8ebf3daea6..21e1e5189a 100644
--- a/django/core/management/commands/test.py
+++ b/django/core/management/commands/test.py
@@ -22,4 +22,4 @@ class Command(BaseCommand):
failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
if failures:
- sys.exit(failures)
+ sys.exit(bool(failures))
diff --git a/tests/runtests.py b/tests/runtests.py
index f556246c90..b461717aa6 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -160,7 +160,7 @@ def django_tests(verbosity, interactive, test_labels):
failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests)
if failures:
- sys.exit(failures)
+ sys.exit(bool(failures))
# Restore the old settings.
settings.INSTALLED_APPS = old_installed_apps