[Wp-unit-tests] [WordPress Unit Tests] #37: wp-test.php does not exit with proper error code when tests fail

WordPress Unit Tests noreply at wordpress.org
Mon Apr 16 15:17:01 UTC 2012


#37: wp-test.php does not exit with proper error code when tests fail
----------------------------+------------------------------------
 Reporter:  benbalter       |      Owner:
     Type:  defect          |     Status:  new
 Priority:  minor           |  Milestone:  Improve Test Framework
Component:  Test Framework  |    Version:
 Keywords:  has-patch       |
----------------------------+------------------------------------
 If running wp-test.php as part of an automated test (e.g., using Travis
 CI), even when a test fails, the script simply ends (what's interpreted as
 a passing return code 0).

 Instead, it should `exit(1)` on failure, and even better explicitly
 `exit(0)` on success so that the proper exit code is passed to other
 programs.

 ( The attached patch also removed the closing PHP tag )

-- 
Ticket URL: <https://unit-test.trac.wordpress.org/ticket/37>
WordPress Unit Tests <https://unit-test.trac.wordpress.org>
My example project


More information about the wp-unit-tests mailing list