|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] osstest: make git proxy setup common
By moving it into TestSupport. No functional change.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Osstest/TestSupport.pm | 20 ++++++++++++++++++++
ts-xen-build-prep | 19 -------------------
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index ea546011..f8ef8233 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,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;
diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index bff5c927..0ec81000 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -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();
--
2.18.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |