From ef64a102339ccec89e6f9a74ca85f23209af9ec3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 16 Apr 2019 18:46:42 +0100 Subject: [PATCH] step handling: Preserve step states set by ts-* scripts 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 --- tcl/JobDB-Executive.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 70728953..57ded025 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -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 " -- 2.39.5