Opened 18 years ago
Closed 18 years ago
#3253 closed enhancement (fixed)
[patch] runtests.py should exit with nonzero status for failure or error
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Testing framework | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
I propose to change the testing system so that for failures, runtests.py or manage.py test return with status code 1 in case of failures. This makes it easier to use the test system automatically.
The attached patch makes django.test.simple.run_tests return the number of failures and uses this return value in runtests.py and manage.py test.
Since I use the test system only for django itself, I didn't check whether it actually works for manage.py test.
Change History (9)
by , 18 years ago
Attachment: | runtests.diff added |
---|
comment:1 by , 18 years ago
Type: | defect → enhancement |
---|
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 18 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
#3576 is a duplicate (without patch) that has been promoted to Accepted, so I promote this one.
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
by , 18 years ago
Attachment: | test_errors.diff added |
---|
Return value should count errors as well as failures
comment:6 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | [patch] runtests.py should exit with nonzero status for failures → [patch] runtests.py should exit with nonzero status for failure or error |
Test run does not exit status >0 on error.
comment:7 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
the patch