From: Felipe Pena Date: Thu, 13 Mar 2008 13:51:40 +0000 (+0000) Subject: Fix valgrind version validation (accepting "valgrind-3.2.1-Debian") X-Git-Tag: php-5.2.6RC3~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8fc46afa7bf947ae4498d917cb65dd7e3202c7e;p=php Fix valgrind version validation (accepting "valgrind-3.2.1-Debian") --- diff --git a/run-tests.php b/run-tests.php index 111add74d8..82f2fb2475 100755 --- a/run-tests.php +++ b/run-tests.php @@ -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."); }