From:             bugs at test-2 dot de
Operating system: Linux
PHP version:      7.1.17
Package:          Testing related
Bug Type:         Bug
Bug description:unexpected change: make test returns 1

Description:
------------
Someone changed the logic in run-tests.php of PHP 7.1.17 (5.6.36, 7.0.30
and 7.2.5 are unaffected):

diff -Naur php-7.1.16/run-tests.php php-7.1.17/run-tests.php
--- php-7.1.16/run-tests.php    Wed Mar 28 09:11:55 2018
+++ php-7.1.17/run-tests.php    Tue Apr 24 18:17:53 2018
@@ -24,7 +24,7 @@
   
+----------------------------------------------------------------------+
  */
 
-/* $Id: 4a412f6f458ff57f1abab3e1b2aff1e5f53f77ba $ */
+/* $Id: c7fcadeab27632c218b62b1ed589057783c601ab $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is
available.
  * In the event it is not, print a nice error message indicating that
this script will
@@ -671,7 +671,7 @@
                                        $html_output = is_resource($html_file);
                                        break;
                                case '--version':
-                                       echo '$Id: 
4a412f6f458ff57f1abab3e1b2aff1e5f53f77ba $' . "\n";
+                                       echo '$Id: 
c7fcadeab27632c218b62b1ed589057783c601ab $' . "\n";
                                        exit(1);
 
                                default:
@@ -841,7 +841,9 @@
 
                junit_save_xml();
 
-               if (getenv('REPORT_EXIT_STATUS') == 1 && 
($sum_results['FAILED'] ||
$sum_results['BORKED'])) {
+               if (getenv('REPORT_EXIT_STATUS') !== '0' &&
+                       getenv('REPORT_EXIT_STATUS') !== 'no' &&
+                       ($sum_results['FAILED'] || $sum_results['BORKED'])) {
                        exit(1);
                }
 
@@ -977,7 +979,9 @@
 
 junit_save_xml();
 
-if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] ||
$sum_results['BORKED'])) {
+if (getenv('REPORT_EXIT_STATUS') !== '0' &&
+       getenv('REPORT_EXIT_STATUS') !== 'no' &&
+       ($sum_results['FAILED'] || $sum_results['BORKED'])) {
        exit(1);
 }
 exit(0);

This change breaks my build script which expects make test to return
success.

Expected result:
----------------
Keep lying about test success.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=76289&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=76289&r=trysnapshot54
Try a snapshot (PHP 5.5):   
https://bugs.php.net/fix.php?id=76289&r=trysnapshot55
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=76289&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76289&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76289&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76289&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76289&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76289&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76289&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76289&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=76289&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=76289&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76289&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76289&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76289&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76289&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76289&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76289&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76289&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76289&r=mysqlcfg


-- 
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to