From: Jason Etheridge Date: Wed, 5 Mar 2014 16:23:00 +0000 (-0500) Subject: expecting errors X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0baa811120c2e5af8d1efbbd08f39908cee271b2;p=working%2Frandom.git expecting errors Tighten down the handling of expected errors, and communicate when there is a mismatch (in addition to Failing the section). Signed-off-by: Jason Etheridge --- diff --git a/qa/test_output_webifier.pl b/qa/test_output_webifier.pl index 9304de6b5..11a8463c3 100755 --- a/qa/test_output_webifier.pl +++ b/qa/test_output_webifier.pl @@ -144,9 +144,15 @@ sub print_pass_or_fail { my $subpage = shift; my $exception = {}; # keyed on subpage, value = # of expected errors $exception{'Installing Evergreen pre-requisites'} = 3; + if (! defined $exception{$subpage}) { + $exception{$subpage} = 0; + } #print "subpage = <$subpage> error_count = $error_count\n"; - if ($error_count && $error_count > $exception{$subpage} ) { + if ($error_count && $error_count != $exception{$subpage} ) { print MAIN_PAGE ' - Failed'; + if ($exception{$subpage} > 0) { + print MAIN_PAGE " - Expected $exception{$subpage} errors but encountered $error_count." + } print PASS_FAIL "Failed\n"; } else { if ($subpage_count) {