[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
Tue Apr 17 15:53:35 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:
Resolution:                  |   Keywords:  has-patch
-----------------------------+------------------------------------

Comment (by kurtpayne):

 I don't think this is going to behave like you want:

 {{{
 exit ( intval( $result->failureCount() ) + intval( $result->errorCount() )
 );
 }}}

 Exit codes are an unsigned byte.  They're limited to a range of 0-255.
 Anything outside that range would just roll over.

 For example, if the combined error and failure count was 355, the above
 code would set the exit code to 355, but that's outside the range, so any
 process that checked the exit code would see 99.

-- 
Ticket URL: <http://unit-tests.trac.wordpress.org/ticket/37#comment:2>
WordPress Unit Tests <http://unit-tests.trac.wordpress.org>
My example project


More information about the wp-unit-tests mailing list