Skip to contentSkip to conversation

sg-run-job: Allow per-job control of test host reuse

PATCH New Ian Jackson 1 participant 2 messages Oct 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sg-run-job: Allow per-job control of test host reuse

---
 sg-run-job | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sg-run-job +3 -2
index c64ae026..69ee715b 100755
@@ -42,10 +42,11 @@ proc per-host-finish {} {
 }
 
 proc run-job {job} {
-    global jobinfo builds flight ok truncate need_xen_hosts
+    global jobinfo builds flight ok reuse_ok truncate need_xen_hosts
     global nested_layers_hosts truncate_globs skip_globs anyskipped
 
     set ok 1
+    set reuse_ok 1
     set truncate 0
     set anyskipped 0
     jobdb::prepare $job
@@ -128,7 +129,7 @@ proc run-job {job} {
 	run-ts !broken =                  ts-host-reuse final host
     }
     set reuse {}
-    if {$ok} { lappend reuse --post-test-ok }
+    if {$ok && $reuse_ok} { lappend reuse --post-test-ok }
     eval [list per-host-ts !broken  = { ts-host-reuse final }] $reuse
 
     if {$ok} { setstatus pass                                             }
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 Do not mark hosts used for pair test as reusable

We do not currently tear down the nbd, and that means the next test cannot remove our LVs.

---
 sg-run-job | 2 ++
 1 file changed, 2 insertions(+)
sg-run-job +2 -0
index 69ee715b..bc5a0c8f 100755
@@ -581,6 +581,8 @@ proc run-job/test-debianhvm {} {
 }
 
 proc setup-test-pair {} {
+    global reuse_ok
+    set reuse_ok 0
     run-ts . =              ts-debian-install      dst_host
     run-ts . =              ts-debian-fixup        dst_host          + debian
     run-ts . =              ts-guests-nbd-mirror + dst_host src_host + debian
Signature · 1 line
2.20.1