diff mbox series

[OSSTEST,51/82] host reuse: Reuse test hosts within a flight

Message ID 20201007180024.7932-52-iwj@xenproject.org (mailing list archive)
State New, archived
Headers show
Series Reuse test hosts | expand

Commit Message

Ian Jackson Oct. 7, 2020, 5:59 p.m. UTC
From: Ian Jackson <ian.jackson@eu.citrix.com>

Mark the host shareable, and unshareable, as appropriate.

There is still a lot more cleanup and improvement to do.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-run-job | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/sg-run-job b/sg-run-job
index af43008d..1e2fcfee 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -29,6 +29,8 @@  proc per-host-prep {} {
     per-host-ts @.      xen-install/@     ts-xen-install
     per-host-ts @.      xen-boot/@        ts-host-reboot
 
+    per-host-ts broken  =               { ts-host-reuse start-test }
+
     per-host-ts .       host-ping-check-xen/@ ts-host-ping-check
     per-host-ts .       =(*)            { ts-leak-check basis }
 }
@@ -64,6 +66,8 @@  proc run-job {job} {
     if {!$ok} return
 
     if {[llength $need_xen_hosts]} {
+        per-host-ts broken  =           { ts-host-reuse prealloc }
+	if {!$ok} return
         eval run-ts broken  =             ts-hosts-allocate + $need_xen_hosts
     }
 
@@ -120,6 +124,7 @@  proc run-job {job} {
        set ok 0
     }
 
+    if {$ok} { per-host-ts .  =            { ts-host-reuse post-test }    }
     if {$ok} { setstatus pass                                             }
 
     if {[llength $need_build_host] && $ok} { jobdb::preserve-task 90 }