diff options
author | Adam Harvey <aharvey@php.net> | 2014-05-22 22:37:57 +0000 |
---|---|---|
committer | Adam Harvey <aharvey@php.net> | 2014-05-22 22:37:57 +0000 |
commit | 34900eb2896d1e80a8be46199dd601059ee1e868 (patch) | |
tree | a77339e402ddc8739ae18c465d3b36c9954782c9 | |
parent | 549331a9256eacfae5e77528499455fb2faf9d58 (diff) | |
parent | e5e6ba093fd55e75554e549ed40ebbc75a8cf063 (diff) | |
download | php-git-34900eb2896d1e80a8be46199dd601059ee1e868.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Fix run-tests.php with Valgrind >= 3.10.0.
-rwxr-xr-x | run-tests.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/run-tests.php b/run-tests.php index f4e1599c53..5230082519 100755 --- a/run-tests.php +++ b/run-tests.php @@ -581,8 +581,8 @@ if (isset($argc) && $argc > 1) { if (!$valgrind_header) { error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); } else { - $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)) { + $valgrind_version = preg_replace("/valgrind-(\d+)\.(\d+)\.(\d+)([.\w_-]+)?(\s+)/", '$1.$2.$3', $valgrind_header, 1, $replace_count); + if ($replace_count != 1) { error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed."); } $valgrind_header = trim($valgrind_header); @@ -1784,7 +1784,7 @@ TEST $file $env['USE_ZEND_ALLOC'] = '0'; $env['ZEND_DONT_UNLOAD_MODULES'] = 1; - if ($valgrind_version >= 330) { + if (version_compare($valgrind_version, '3.3.0', '>=')) { /* valgrind 3.3.0+ doesn't have --log-file-exactly option */ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd"; } else { |