]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
sg-run-job: Break out allocate-build-host, and reorder
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 19 Jun 2017 16:24:02 +0000 (16:24 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 21 Jun 2017 22:22:58 +0000 (23:22 +0100)
We're going to want to start the syslog server after host allocation
but before installation, so we need to split these steps up.

A side effect is that a build job becomes `running' when it starts its
host install, not when it starts the actual build.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

sg-run-job

index ea3ea4187fa107a1c2153d08b7d6e39d1802fc78..620d89abaf2a2c41e2bcca89e2650217eaf82be4 100755 (executable)
@@ -69,13 +69,16 @@ proc run-job {job} {
         eval run-ts broken  =             ts-hosts-allocate + $need_xen_hosts
     }
 
-    if {$need_build_host} { catching-otherwise broken prepare-build-host }
+    if {$need_build_host} { catching-otherwise broken allocate-build-host }
 
     if {$ok} { setstatus running                                          }
 
     if {$ok && ![catch { info args prep-job/$jobinfo(recipe) }]} \
         {      catching-otherwise fail     prep-job/$jobinfo(recipe)      }
 
+    if {$ok && $need_build_host} \
+        { catching-otherwise broken prepare-build-host }
+
     per-host-ts broken  host-install/@(*) ts-host-install-twice
 
     per-host-prep
@@ -689,9 +692,12 @@ proc run-job/build-xtf {} {
     run-ts . = ts-xtf-build
 }
 
-proc prepare-build-host {} {
+proc allocate-build-host {} {
     global jobinfo
     run-ts broken = ts-hosts-allocate + host
+}
+proc prepare-build-host {} {
+    global jobinfo
     run-ts broken host-install(*) ts-host-install-twice
     run-ts . host-build-prep ts-xen-build-prep
 }