From 0baa811120c2e5af8d1efbbd08f39908cee271b2 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 5 Mar 2014 11:23:00 -0500 Subject: [PATCH] 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 --- qa/test_output_webifier.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) { -- 2.11.0