| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 02/24] sg-report-flight: Do not report <none executed> unless it's true
 This fallback $storefail->() call is normally run because the job
failed without running any steps.  But it can also happen because the
job execution itself failed (eg, sg-run-job crashed).
If there were any steps, replace the <none executed> text with
<job status>.  This is accurate, if rather uninformative.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 sg-report-flight | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sg-report-flight b/sg-report-flight
index 5e362b9..b7cd03a 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -454,8 +454,11 @@ END
         };
 
         my $gridrow= 0;
+       my $foundsteps= 0;
 
        while (my $s= $stepsq->fetchrow_hashref()) {
+           $foundsteps++;
+
            $jobtext .= sprintf "%2d %-${sl}s %-${rl}s\n",
                $s->{stepno}, $s->{testid}, $s->{status};
 
@@ -493,7 +496,7 @@ END
             $storefail->({
                 stepno => '',
                 status => "$j->{status}",
-                testid => '<none executed>'
+                testid => $foundsteps ? '<job status>' : '<none executed>'
             });
         }
 
-- 
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |