]> granicus.if.org Git - php/commitdiff
fix regex to detect valgrind version
authorNuno Lopes <nlopess@php.net>
Sat, 8 Feb 2014 11:54:27 +0000 (06:54 -0500)
committerNuno Lopes <nlopess@php.net>
Sat, 8 Feb 2014 11:54:27 +0000 (06:54 -0500)
New PCRE version got stricter

run-tests.php

index d53c3b6c5ef3b2a2ba5dcbefb2fac1c9ae50957a..305b48d9335b7fa38b96d023fd21bdbb2e6e52a9 100755 (executable)
@@ -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.");
                                                }