[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
This commit is contained in:
parent
f686075083
commit
07fa03dde4
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user