]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
mfi-common: always add host suite to hostos_runvars
authorIan Campbell <ian.campbell@citrix.com>
Mon, 18 Jan 2016 14:28:49 +0000 (14:28 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 17 Feb 2016 11:16:24 +0000 (11:16 +0000)
This avoids situations where production-config* has changed
DebianSuite but the bisector is still picking up baselines etc from
before the change and reusing their runvars (without suite) with an
inconsistent config.

Switch selecthost() to use target_var when querying the suite. This
means it will check the "{ident}_suite" runvar first as before but
fallback to just looking at the "all_host_suite" runvar. We also
change the existing host_suite to all_host_suite in mfi-commong so
that test_matrix_iterate() needn't worry about ident=host vs
=src_host/dst_host etc (of course this can still be overridden if
desired by using src_host_suite etc, but nowhere does.

Other uses of $c{DebianSuite} have been abolished already.

Note that "$suite != $defsuite" is not true for any current production
invocation of osstest. If this was ever true then we would have set
the host_suite runvar, whereas now we always set all_host_suite.
However any old flights with host_suite would still be interpretted
the same. Note also that the "$suite != $defsuite" case was previously
broken for the -pair tests since the host idents there are 'src_host'
and 'dst_host', so the previous code would have fallen back to
$c{DebianSuite} without looking at the host_suite runvar.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm
mfi-common

index 742b2e326743498ae34ca6b89cccb3bdd9833b9a..68af10d9579edfbd226924fb77ce8eb227a7d2eb 100644 (file)
@@ -861,8 +861,7 @@ sub selecthost ($) {
         Info => [],
     };
     if (defined $job) {
-       $ho->{Suite} = get_runvar_default("${ident}_suite",$job,
-                                         $c{DebianSuite});
+       $ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite};
     }
 
     #----- handle hosts which are themselves guests (nested) -----
index 152ad589afb37b792149544a7b7afaa52f478895..db12be8294f5a9d336404773b76ac46a7fa9bceb 100644 (file)
@@ -123,11 +123,7 @@ create_build_jobs () {
     *)     suite=$defsuite;;
     esac
 
-    if [ $suite != $defsuite ] ; then
-        hostos_runvars="host_suite=$suite"
-    else
-        hostos_runvars=
-    fi
+    hostos_runvars="all_host_suite=$suite"
 
     # In 4.4 onwards xend is off by default. If necessary we build a
     # separate set of binaries with xend enabled in order to run those
@@ -411,11 +407,7 @@ test_matrix_iterate () {
     *)     suite=$defsuite; guestsuite=$defguestsuite;;
     esac
 
-    if [ $suite != $defsuite ] ; then
-        hostos_runvars="host_suite=$suite"
-    else
-        hostos_runvars=
-    fi
+    hostos_runvars="all_host_suite=$suite"
 
     for kern in ''; do