From 84d1b8723add71e79a56de1063031a68b70aee9c Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Mon, 20 Aug 2018 12:00:19 +0200 Subject: [PATCH] osstest: make git proxy setup common MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit By moving it into TestSupport. No functional change. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Osstest/TestSupport.pm | 21 +++++++++++++++++++++ ts-xen-build-prep | 21 +-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) 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}); -- 2.39.5