]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
step logfiles: Populate logfile column with logfile name
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 29 Jun 2017 15:19:16 +0000 (16:19 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 30 Jun 2017 16:18:27 +0000 (17:18 +0100)
This is part of a "Populate-then-rely" schema change, as described in
schema/README.updates.  Specifically, this is the final part of the
step:

5. Commit: code to populate new column; changing `add' to status
   Needed and `constraint' to status Ready.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
schema/steps-logfile-constraint.sql
tcl/JobDB-Executive.tcl

index ea4515d0d923a7ca0d054b0b9319f1a90e5a5b19..5895f45c0994c2d8f73ee32d2b487dd0e3a980c6 100644 (file)
@@ -1,4 +1,4 @@
--- ##OSSTEST## 004 Unfinished
+-- ##OSSTEST## 004 Ready
 --
 -- Previously, the logfile name was inferred from "stepno" and
 -- "testid".  Newer code will need it to be set explicitly.
index ed636e49f726818d15d92cea2ad73b4247997d45..073401837de56ffeeabc152b6d3157017f6d5581 100644 (file)
@@ -281,12 +281,13 @@ proc spawn-step-begin {flight job ts stepnovar} {
            } else {
                set stepno 1
            }
+           set logfile [step-log-leafname $stepno $ts]
            db-execute "
                INSERT INTO steps (flight, job, stepno,
-                                   step, status,
+                                   step, logfile, status,
                                    testid)
                    VALUES ([pg_quote $flight], [pg_quote $job], $stepno,
-                           [pg_quote $ts], 'running',
+                           [pg_quote $ts], [pg_quote $logfile], 'running',
                            'STARTING')
            "
        } emsg]} {