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 <jason@esilibrary.com>
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 ' - <span class="fail">Failed</span>';
+ if ($exception{$subpage} > 0) {
+ print MAIN_PAGE " - Expected $exception{$subpage} errors but encountered $error_count."
+ }
print PASS_FAIL "Failed\n";
} else {
if ($subpage_count) {