testcases: report tests with AddressSanitizer/LeakSanitizer reports

This commit is contained in:
Michael Stapelberg 2016-01-09 17:19:12 +01:00
parent cb3cdb602a
commit 196e63e1bf
1 changed files with 14 additions and 0 deletions

View File

@ -262,6 +262,20 @@ if ($options{coverage}) {
}
}
# Report logfiles that match “(Leak|Address)Sanitizer:”.
my @logs_with_leaks;
for my $log (<$outdir/i3-log-for-*>) {
if (slurp($log) =~ /(Leak|Address)Sanitizer:/) {
push @logs_with_leaks, $log;
}
}
if (scalar @logs_with_leaks > 0) {
say "\nThe following test logfiles contain AddressSanitizer or LeakSanitizer reports:";
for my $log (sort @logs_with_leaks) {
say "\t$log";
}
}
exit ($aggregator->failed > 0);
#