ability to consider final Return Value
authorJason Etheridge <jason@esilibrary.com>
Tue, 8 Dec 2015 21:26:14 +0000 (16:26 -0500)
committerJason Etheridge <jason@esilibrary.com>
Tue, 8 Dec 2015 21:26:14 +0000 (16:26 -0500)
for a given section/subpage.  So, given the churn in output from 3rd party tests
from the "Installing Evergreen pre-requisites" section, we'll be more lenient
and just consider the final return value from the Makefile there.  We'll still
style errors in Red in the section output itself.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
qa/test_output_webifier.pl

index b91748d..d3c550f 100755 (executable)
@@ -8,6 +8,7 @@ my $q = CGI->new;
 
 my $state = 'skipping';
 my $error_count = 0;
+my $subpage_return_value;
 my $subpage_count = 0;
 my $subpage = '';
 my $opensrf_tip = '';
@@ -79,6 +80,7 @@ while (my $line = <>) {
             $error_count++;
         }
         if ($line =~ /^Return Value = (.+)$/) {
+            $subpage_return_value = $1;
             if ($1 ne '0') {
                 $class .= 'fail ';
                 $error_count++;
@@ -147,11 +149,17 @@ sub html_footer {
 sub print_pass_or_fail {
     my $subpage = shift;
     my $exception = {}; # keyed on subpage, value = # of expected errors
-    $exception{'Installing Evergreen pre-requisites'} = 1; # Class-DBI-Frozen test failure
     $exception{'Log Output: osrfsys.log'} = 3; # open-ils.cstore ERROR from live_t/08-lp1366964-libdbi-error.t (and related)
     if (! defined $exception{$subpage}) {
         $exception{$subpage} = 0;
     }
+    # just consider the final Return Value for the following subpages:
+    if ($subpage eq 'Installing Evergreen pre-requisites') {
+        $error_count = 0;
+        if ($subpage_return_value ne '0') {
+            $error_count = 1;
+        }
+    }
     #print "subpage = <$subpage> error_count = $error_count\n";
     if ($error_count && $error_count != $exception{$subpage} ) {
         print MAIN_PAGE ' - <span class="fail">Failed</span>';