From: Roger Pau Monne Date: Mon, 20 Aug 2018 10:00:19 +0000 (+0200) Subject: osstest: make git proxy setup common X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=84d1b8723add71e79a56de1063031a68b70aee9c;p=osstest.git osstest: make git proxy setup common By moving it into TestSupport. No functional change. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ea54601..2910842 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -138,6 +138,7 @@ BEGIN { host_install_postboot_complete target_core_dump_setup sha256file host_shared_mark_ready + gitcache_setup ); %EXPORT_TAGS = ( ); @@ -2903,4 +2904,24 @@ sub host_shared_mark_ready($$) { $sharetype); } +sub gitcache_setup ($) { + my ($ho) = @_; + my $proxy = $c{GitCacheProxy}; + return unless $proxy; + + logm("setting up git cacheing proxy $proxy"); + + my $gitcfg = ''; + foreach my $urlprefix (qw(git:// http:// https://)) { + $gitcfg .= <{Flags}{'no-reinstall'}) { determine_vg_lv(); lvcreate(); @@ -272,7 +253,7 @@ if (!$ho->{Flags}{'no-reinstall'}) { lvextend_stage2(); replace_home(); ccache_setup(); - gitcache_setup(); + gitcache_setup($ho); } host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch});