Django

Code

Ticket #3253 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

[patch] runtests.py should exit with nonzero status for failure or error

Reported by: mir@noris.de Assigned to: adrian
Milestone: Component: Unit test system
Version: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

runtests.diff (3.6 kB) - added by mir@noris.de on 01/08/07 12:12:06.
the patch
test_errors.diff (345 bytes) - added by paulegan@3continents.net on 03/27/07 11:43:21.
Return value should count errors as well as failures

Change History

01/08/07 12:12:06 changed by mir@noris.de

  • attachment runtests.diff added.

the patch

01/08/07 12:14:26 changed by mir@noris.de

  • type changed from defect to enhancement.

01/24/07 16:23:31 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Unreviewed to Design decision needed.

02/26/07 06:27:07 changed by anonymous

  • stage changed from Design decision needed to Ready for checkin.

#3576 is a duplicate (without patch) that has been promoted to Accepted, so I promote this one.

02/26/07 06:27:25 changed by mir@noris.de

Last one was me.

02/26/07 06:52:01 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [4608]) Fixed #3253 -- Exposed the number of failed tests as a return code in manage.py and runtests.py.

03/27/07 11:43:21 changed by paulegan@3continents.net

  • attachment test_errors.diff added.

Return value should count errors as well as failures

03/27/07 11:45:56 changed by paulegan@3continents.net

  • status changed from closed to reopened.
  • resolution deleted.
  • summary changed from [patch] runtests.py should exit with nonzero status for failures to [patch] runtests.py should exit with nonzero status for failure or error.

Test run does not exit status >0 on error.

See attachment:test_errors.diff

03/29/07 06:59:31 changed by russellm

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4850]) Fixed #3253 -- Included test errors in the return code.


Add/Change #3253 ([patch] runtests.py should exit with nonzero status for failure or error)




Change Properties
Action