]> xenbits.xensource.com Git - osstest.git/commitdiff
runvar access: Introduce sharing_for_build
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 21 Aug 2020 11:47:44 +0000 (12:47 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 7 Oct 2020 16:48:33 +0000 (17:48 +0100)
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 <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm
ts-host-install
ts-xen-build-prep

index 6403e52bdae6ef1991c796b726c4cb734b69fd17..c6bd6714b1c80026c4799febbb84ba10a0519359 100644 (file)
@@ -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 "*";
index b0fd2028aa33c1bb9ca2364847aa9f19b79ab986..5badc70680dace02f752eb69615a1cbc5e57adf0 100755 (executable)
@@ -49,6 +49,8 @@ while (@ARGV and $ARGV[0] =~ m/^-/) {
     }
 }
 
+if ($build) { sharing_for_build(); }
+
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
index 092bbffef6c943cf0042cdefacbae7cc026c7a63..fcabf75a1686ffcd80da8c0e9320d8496d13c573 100755 (executable)
@@ -24,6 +24,7 @@ use Osstest::TestSupport;
 use Osstest::Debian;
 
 tsreadconfig();
+sharing_for_build();
 
 our ($whhost) = @ARGV;
 $whhost ||= 'host';