]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
step logfiles: Rely on new logfile column
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 29 Jun 2017 16:13:50 +0000 (17:13 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 May 2018 16:24:15 +0000 (17:24 +0100)
These are the three places which read logfile from the db, but had a
fallback to a computation involving stepno and step.

But, after steps-logfile-constraint, the logfile column is NOT NULL
(and populated with computed default data if need be) so this is not
needed any more

This is part of a "Populate-then-rely" schema change, as
described in schema/README.updates.  Specifically, the step:
10. Optionally commit: code which relies on new column, and does not
   necessarily tolerate NULL/DEFAULT; changing `constraint' to Needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
determine-failure-reasons
schema/steps-logfile-constraint.sql
sg-report-flight

index cf40ca3b0ebb98fd255c8c898d1ffbf4858dd3a5..1ede738379f34ccadf0cbfb6a4a196122fd143ed 100755 (executable)
@@ -52,7 +52,7 @@ sub gethosts ($) {
 }
 
 while (my $step= $stepsq->fetchrow_hashref) {
-    my $logfile = $step->{logfile} // "$step->{stepno}.$step->{step}.log";
+    my $logfile = $step->{logfile};
     $step->{Log}= "$c{Logs}/$step->{flight}/$step->{job}/".$logfile;
 
     if (!stat $step->{Log}) {
index 5895f45c0994c2d8f73ee32d2b487dd0e3a980c6..f6f8a744ca14f0acb3b00faa526a0803b969a499 100644 (file)
@@ -1,4 +1,4 @@
--- ##OSSTEST## 004 Ready
+-- ##OSSTEST## 004 Needed
 --
 -- Previously, the logfile name was inferred from "stepno" and
 -- "testid".  Newer code will need it to be set explicitly.
index e69efb7f3ab22aa5a1b45758177e68ec5e13b243..2f5c39119c18fb3fe5ad0104729a177b5c4af3e3 100755 (executable)
@@ -1001,8 +1001,7 @@ END
         printf H "<td>%s</td>", show_abs_time $step->{started};
 
         my $st= $step->{status};
-        my $logfilename= $step->{logfile}
-           // "$step->{stepno}.$step->{step}.log";
+        my $logfilename= $step->{logfile};
         printf H "<td bgcolor='%s'><a href='%s'>%s</a></td>",
            (html_status2_colour_priority($st))[0],
             encode_entities(uri_escape($logfilename)),
@@ -1168,7 +1167,7 @@ END
                : ('#ffff00',250);
        }
        my $ch = "bgcolor=\"$bgc\"";
-       my $logfilename= $s->{logfile} // "$s->{stepno}.$s->{step}.log";
+       my $logfilename= $s->{logfile};
        my $h = "<a href=\"".encode_entities($s->{job}).
            "/".encode_entities($logfilename)."\">";
        #print H "[$s->{stepno}] ";