com php-src: fix regex to detect valgrind version New PCRE version got stricter: run-tests.php
| From: | Nuno Lopes | Date: | Sat, 08 Feb 2014 12:07:15 +0000 |
| Subject: | com php-src: fix regex to detect valgrind version New PCRE version got stricter: run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75934@lists.php.net to get a copy of this message | ||
Commit: 7b7d2952a606fba6a5e219986a7675411cc4ba42
Author: Nuno Lopes <nlopess@php.net> Sat, 8 Feb 2014 06:54:27 -0500
Parents: 237c1bf7b56cf1a7e98675bbeeb507853fec1fd7
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b7d2952a606fba6a5e219986a7675411cc4ba42
Log:
fix regex to detect valgrind version
New PCRE version got stricter
Changed paths:
M run-tests.php
Diff:
diff --git a/run-tests.php b/run-tests.php
index cd6038e..f4e1599 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -581,7 +581,7 @@ if (isset($argc) && $argc > 1) {
if (!$valgrind_header) {
error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is
installed.");
} else {
- $valgrind_version =
preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)([.-\w]+)?(\s+)/", '$1$2$3',
$valgrind_header, 1, $replace_count);
+ $valgrind_version = preg_replace("/valgrind-(\d)\.(\d)\.(\d+)([.\w_-]+)?(\s+)/",
'$1$2$3', $valgrind_header, 1, $replace_count);
if ($replace_count != 1 || !is_numeric($valgrind_version)) {
error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot
proceed.");
}