From a8fc46afa7bf947ae4498d917cb65dd7e3202c7e Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 13 Mar 2008 13:51:40 +0000 Subject: [PATCH] Fix valgrind version validation (accepting "valgrind-3.2.1-Debian") --- run-tests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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."); } -- 2.50.1