]> granicus.if.org Git - php/commitdiff
MFH: Support versions of valgrind from SVN. The version is shown as 3.4.0.SVN
authorScott MacVicar <scottmac@php.net>
Sat, 8 Nov 2008 02:05:03 +0000 (02:05 +0000)
committerScott MacVicar <scottmac@php.net>
Sat, 8 Nov 2008 02:05:03 +0000 (02:05 +0000)
Save the bunnies

run-tests.php

index 2b0dfc0f751fa03c7f905496149cc5a943f6868b..c40592cd78a594f723e69d5ccf06c705efdba6e7 100755 (executable)
@@ -540,7 +540,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-([0-9])\.([0-9])\.([0-9]+)([.-]\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.");
                                                }