]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
TestSupport: target_var: Use host_V for host variables
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 26 Apr 2019 13:07:08 +0000 (14:07 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 1 May 2019 10:34:23 +0000 (11:34 +0100)
Change `target_var' to set `IDENT_V' rather than just V.  For
compatibility with older flights and older flight construction,
look for plain V too when looking up the variable.

And, we now look at all_host_V before V.  This has no functional
change with existing flights, because existing flights only have
  all_host_suite
  all_host_di_version
  all_host_os
and we never set the corresponding V form of those variables.

So with existing flights the only functional change is a change to
synth runvars, to add HOST_ to the name.

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

index f357434f4ebc7089caa9912df161ed278ded3d50..bb50355919f90f69c8f6273b80083357deceaebb 100644 (file)
@@ -2479,8 +2479,7 @@ sub guest_await ($$) {
 
 sub target_var_prefix ($) {
     my ($ho) = @_;
-    if (exists $ho->{Guest}) { return $ho->{Guest}.'_'; }
-    return '';
+    return (exists $ho->{Guest} ? $ho->{Guest} : $ho->{Ident}).'_';
 }
 
 sub target_var ($$) {
@@ -2491,6 +2490,7 @@ sub target_var ($$) {
        push @prefixes, 'all_guest_';
     } else {
        push @prefixes, 'all_host_';
+       push @prefixes, '';
     }
     foreach my $prefix (@prefixes) {
        my $v = $r{ $prefix.$vn };