osstest: setup git proxy for FreeBSD
PATCH 1/1 osstest: setup git proxy for FreeBSD
Make the git proxy setup common by moving it into TestSupport and use it for both Linux and FreeBSD.
Signed-off-by Roger Pau Monné <[email protected]>
---
Cc: Ian Jackson <[email protected]>
--- Osstest/TestSupport.pm | 20 ++++++++++++++++++++ ts-build-prep-freebsd | 1 + ts-xen-build-prep | 19 ------------------- 3 files changed, 21 insertions(+), 19 deletions(-)
Osstest/TestSupport.pm +20 -0
@@ -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,23 @@ sub host_shared_mark_ready($$) { $sharetype); } +sub gitcache_setup () { + my $proxy = $c{GitCacheProxy}; + return unless $proxy; + + logm("setting up git cacheing proxy $proxy"); + + my $gitcfg = ''; + foreach my $urlprefix (qw(git:// http:// https://)) { + $gitcfg .= <<END +[url "${proxy}$urlprefix"] + insteadOf = $urlprefix +[url "${proxy}$urlprefix"] + insteadOf = ${proxy}$urlprefix +END + } + target_putfilecontents_stash($ho,30,$gitcfg,"/home/osstest/.gitconfig", + 'home-osstest-gitconfig'); +} + 1;
ts-build-prep-freebsd +1 -0
@@ -38,6 +38,7 @@ sub install_deps () { } install_deps(); +gitcache_setup(); our $path_prefix = $r{"freebsd_distpath"} || get_stashed("path_freebsddist", $r{"freebsdbuildjob"});
ts-xen-build-prep +0 -19
@@ -245,25 +245,6 @@ sub ccache_setup () { } } -sub gitcache_setup () { - my $proxy = $c{GitCacheProxy}; - return unless $proxy; - - logm("setting up git cacheing proxy $proxy"); - - my $gitcfg = ''; - foreach my $urlprefix (qw(git:// http:// https://)) { - $gitcfg .= <<END -[url "${proxy}$urlprefix"] - insteadOf = $urlprefix -[url "${proxy}$urlprefix"] - insteadOf = ${proxy}$urlprefix -END - } - target_putfilecontents_stash($ho,30,$gitcfg,"/home/osstest/.gitconfig", - 'home-osstest-gitconfig'); -} - if (!$ho->{Flags}{'no-reinstall'}) { determine_vg_lv(); lvcreate();
Signature · 7 lines
2.18.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Roger Pau Monne writes ("[PATCH] osstest: setup git proxy for FreeBSD"):
Quoted 2 lines
Make the git proxy setup common by moving it into TestSupport and use it for both Linux and FreeBSD.
Can you please split the code motion from the functional change ?
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel