diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-01-28 00:21:49 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-01-28 00:21:49 +0300 |
commit | 2b2ca2dbf8b83a135220bbed2c3933af8587aa17 (patch) | |
tree | 03c64d6cbcbf0828976e6c3ca25325d2efc15eba | |
parent | ef8c67a1d7c45391f9eaceb446f4e9a33df7b061 (diff) | |
parent | 93ed825dcb38f07bcef77caa529edf3b186dabdd (diff) |
Merge pull request #2523 from akoeplinger/fix-profiler-test-reporting
[profiler] Fix test reporting success even though a test failed
-rwxr-xr-x | mono/profiler/ptestrunner.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mono/profiler/ptestrunner.pl b/mono/profiler/ptestrunner.pl index fc29b43b260..2113c25135f 100755 --- a/mono/profiler/ptestrunner.pl +++ b/mono/profiler/ptestrunner.pl @@ -6,7 +6,8 @@ use strict; my $builddir = shift || die "Usage: ptestrunner.pl mono_build_dir\n"; my @errors = (); -my $total_errors = 0; +my $total_errors = 0; # this is reset before each test +my $global_errors = 0; my $report; my $profbuilddir = $builddir . "/mono/profiler"; @@ -106,7 +107,7 @@ report_errors (); emit_nunit_report(); -exit ($total_errors? 1: 0); +exit ($global_errors ? 1 : 0); # utility functions sub append_path { @@ -156,6 +157,7 @@ sub report_errors foreach my $e (@errors) { print "Error: $e\n"; $total_errors++; + $global_errors++; } print "Total errors: $total_errors\n" if $total_errors; #print $report; @@ -168,7 +170,7 @@ sub emit_nunit_report use Net::Domain qw(hostname hostfqdn); use locale; - my $failed = $total_errors ? 1 : 0; + my $failed = $global_errors ? 1 : 0; my $successbool; my $total = 1; my $mylocale = setlocale (LC_CTYPE); |