]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-hosts-allocate-Executive: Allow to tolerate missing resources
authorIan Jackson <iwj@xenproject.org>
Thu, 1 Oct 2020 14:18:39 +0000 (15:18 +0100)
committerIan Jackson <iwj@xenproject.org>
Thu, 1 Oct 2020 16:10:43 +0000 (17:10 +0100)
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

index 698437c051209ec939518965d4f9fc154394e4e0..58d2a389d051c463ff45e7d3545d1141b693a9fe 100755 (executable)
@@ -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;
     }