]> xenbits.xensource.com Git - osstest.git/commitdiff
host reuse: Reuse test hosts within a flight
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 21 May 2019 16:06:24 +0000 (17:06 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 7 Oct 2020 16:15:49 +0000 (17:15 +0100)
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

index af43008db63f3dff6bcbbf643f35ee60f7d0652a..1e2fcfeef8aa4c1af1db441bb3922e660e4159df 100755 (executable)
@@ -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 }