Skip to content

Commit

Permalink
fix regex to detect valgrind version
Browse files Browse the repository at this point in the history
New PCRE version got stricter
  • Loading branch information
nunoplopes committed Feb 8, 2014
1 parent 237c1bf commit 7b7d295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-tests.php
Expand Up @@ -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.");
}
Expand Down

0 comments on commit 7b7d295

Please sign in to comment.