summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2018-03-02 13:14:35 +0100
committerJoe Watkins <krakjoe@php.net>2018-03-02 13:14:35 +0100
commit03f15f705ad30ce2dde7f7b2ab087a132b859ba0 (patch)
treefaf4c8a1817142f632a20ee2aaf265a0a75dd91d /run-tests.php
parentc29f1f41c32cd58c26983d1e2235e1e67cd62383 (diff)
downloadphp-git-03f15f705ad30ce2dde7f7b2ab087a132b859ba0.tar.gz
add ability to show valgrind output with --show-mem
Diffstat (limited to 'run-tests.php')
-rw-r--r--[-rwxr-xr-x]run-tests.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/run-tests.php b/run-tests.php
index cbef1dc367..e22106e964 100755..100644
--- a/run-tests.php
+++ b/run-tests.php
@@ -497,7 +497,7 @@ $no_clean = false;
$slow_min_ms = INF;
$cfgtypes = array('show', 'keep');
-$cfgfiles = array('skip', 'php', 'clean', 'out', 'diff', 'exp');
+$cfgfiles = array('skip', 'php', 'clean', 'out', 'diff', 'exp', 'mem');
$cfg = array();
foreach($cfgtypes as $type) {
@@ -860,7 +860,7 @@ HELP;
junit_save_xml();
- if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
+ if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['LEAKED'])) {
exit(1);
}
@@ -997,8 +997,7 @@ if ($html_output) {
save_or_mail_results();
junit_save_xml();
-
-if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
+if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['LEAK'] || $sum_results['LEAKED'])) {
exit(1);
}
exit(0);
@@ -2215,6 +2214,10 @@ $output
error_report($file, $log_filename, $tested);
}
}
+
+ if ($valgrind && $leaked && $cfg["show"]["mem"]) {
+ show_file_block('mem', file_get_contents($memcheck_filename));
+ }
show_result(implode('&', $restype), $tested, $tested_file, $info, $temp_filenames);