Permalink
Browse files

fix regex to detect valgrind version

New PCRE version got stricter
  • Loading branch information...
1 parent 237c1bf commit 7b7d2952a606fba6a5e219986a7675411cc4ba42 @nunoplopes nunoplopes committed Feb 8, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 run-tests.php
View
@@ -581,7 +581,7 @@ function save_or_mail_results()
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.");
}

0 comments on commit 7b7d295

Please sign in to comment.