diff mbox series

[OSSTEST,4/8] ts-hosts-allocate-Executive: Allow to tolerate missing resources

Message ID 20201001162439.18160-4-iwj@xenproject.org (mailing list archive)
State New, archived
Headers show
Series [OSSTEST,1/8] Executive: Fix an undef warning message | expand

Commit Message

Ian Jackson Oct. 1, 2020, 4:24 p.m. UTC
Now, a job can specify that lack of a suitable host should be treated
as a plain test failure (ie, subject to the usual regression analysis)
rather than as an infrastructure or configuration problem.

This will be useful for some tests which don't work in some branches
because of lack of suitable hardware.  We want to avoid encoding our
hardware availability situation in make-flight.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 ts-hosts-allocate-Executive | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 698437c0..58d2a389 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -704,6 +704,10 @@  sub alloc_hosts () {
 	my ($ok, $bookinglist) = attempt_allocation({
             ts_hosts_allocate_precheck => 1,
         }, 0);
+	if ($ok == $alloc_starved_r && $r{hostalloc_missing_expected}) {
+	    broken 'no suitable hosts available (as possibly expected)',
+	      'fail';
+	}
 	die $ok if $ok>1;
     }