]> granicus.if.org Git - php/commitdiff
Fix valgrind version validation (accepting "valgrind-3.2.1-Debian")
authorFelipe Pena <felipe@php.net>
Thu, 13 Mar 2008 13:51:40 +0000 (13:51 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 13 Mar 2008 13:51:40 +0000 (13:51 +0000)
run-tests.php

index 111add74d8685602e0dbb203d7e32f4c4ad1db46..82f2fb2475cc330f68b9a5746dd1f3b208ef338e 100755 (executable)
@@ -1421,7 +1421,7 @@ TEST $file
                        if (!$out) {
                                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]+)(\s+)/", '$1$2$3', $out, 1, $replace_count);
+                               $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(?:-\w+)?\s*/", '$1$2$3', $out, 1, $replace_count);
                                if ($replace_count != 1 || !is_numeric($valgrind_version)) {
                                        error("Valgrind returned invalid version info (\"$out\"), cannot proceed.");
                                }