[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 16/17] step logfiles: Populate logfile column with logfile name



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@xxxxxxxxxxxxx>
---
 schema/steps-logfile-constraint.sql | 2 +-
 tcl/JobDB-Executive.tcl             | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/schema/steps-logfile-constraint.sql 
b/schema/steps-logfile-constraint.sql
index 100bb31..462941e 100644
--- a/schema/steps-logfile-constraint.sql
+++ b/schema/steps-logfile-constraint.sql
@@ -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.
diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl
index ed636e4..0734018 100644
--- a/tcl/JobDB-Executive.tcl
+++ b/tcl/JobDB-Executive.tcl
@@ -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]} {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.