]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
step handling: Preserve step states set by ts-* scripts
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 16 Apr 2019 17:46:42 +0000 (18:46 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 29 Apr 2019 17:05:57 +0000 (18:05 +0100)
sg-run-job would unconditionally set the step state to the value it
calculated, which would usually be `pass' or `fail' or
`broken' (according to the recipe).

Relax this interface somewhat to allow a test script to set the step
status itself: specifically, do not overwrite an existing status of
  aborted broken starved

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tcl/JobDB-Executive.tcl

index 70728953b5634220d68559eb42eaf44872726f06..57ded025c142f98924b65ad750f6ef7f43fa0d7c 100644 (file)
@@ -316,11 +316,14 @@ proc spawn-step-commit {flight job stepno testid} {
 
 proc step-set-status {flight job stepno st} {
     transaction flights {
-        db-update-1 "
+        db-execute "
             UPDATE steps
                SET status='$st',
                    finished=[clock seconds]
              WHERE flight=$flight AND job='$job' AND stepno=$stepno
+               AND status<>'aborted'
+               AND status<>'broken'
+               AND status<>'starved'
         "
         set pause 0
         db-execute-array stopinfo "