From: Ian Jackson Date: Fri, 21 Aug 2020 11:47:44 +0000 (+0100) Subject: runvar access: Introduce sharing_for_build X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fa5514fc28ddb197e26b62bc915d6e4e72007f84;p=osstest.git runvar access: Introduce sharing_for_build Builds don't have so much contingent setup. We don't track the runvars; we just rely on the share-* hostflag set in the job. But selecthost() is going to automatically enable runvar access control for shared/reused hosts. So, provide a way to disable that. Signed-off-by: Ian Jackson --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 6403e52..c6bd671 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -143,7 +143,7 @@ BEGIN { sha256file host_shared_mark_ready gitcache_setup - @accessible_runvar_pats + @accessible_runvar_pats sharing_for_build ); %EXPORT_TAGS = ( ); @@ -3171,6 +3171,8 @@ END 'home-osstest-gitconfig'); } +sub sharing_for_build () { @accessible_runvar_pats = qw(*); }; + sub runvar_access_restrict () { # restricts runvars to those in @accessible_runvar_pats return if "@accessible_runvar_pats" eq "*"; diff --git a/ts-host-install b/ts-host-install index b0fd202..5badc70 100755 --- a/ts-host-install +++ b/ts-host-install @@ -49,6 +49,8 @@ while (@ARGV and $ARGV[0] =~ m/^-/) { } } +if ($build) { sharing_for_build(); } + our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 092bbff..fcabf75 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -24,6 +24,7 @@ use Osstest::TestSupport; use Osstest::Debian; tsreadconfig(); +sharing_for_build(); our ($whhost) = @ARGV; $whhost ||= 'host';