php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76289 unexpected change: make test returns 1
Submitted: 2018-04-30 15:03 UTC Modified: 2018-04-30 15:20 UTC
From: bugs at test-2 dot de Assigned:
Status: Not a bug Package: Testing related
PHP Version: 7.1.17 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bugs at test-2 dot de
New email:
PHP Version: OS:

 

 [2018-04-30 15:03 UTC] bugs at test-2 dot de
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-30 15:20 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 08 05:01:23 2021 UTC