diff mbox

[OSSTEST,06/15] sg-run-job: Execute prep-job/RECIPE if it exists

Message ID 1498054447-11281-7-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson June 21, 2017, 2:13 p.m. UTC
This allows a job to do its own host allocation, for example.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch
---
 sg-run-job | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/sg-run-job b/sg-run-job
index 8acb902..cfbc34b 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -73,6 +73,9 @@  proc run-job {job} {
 
     if {$ok} { setstatus running                                          }
 
+    if {$ok && ![catch { info args prep-job/$jobinfo(recipe) }]} \
+        {      catching-otherwise fail     prep-job/$jobinfo(recipe)      }
+
     per-host-ts broken  host-install/@(*) ts-host-install-twice
 
     per-host-prep