xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH] osstest: setup git proxy for FreeBSD
Date: Mon, 20 Aug 2018 12:05:33 +0200	[thread overview]
Message-ID: <20180820100533.28063-1-roger.pau@citrix.com> (raw)

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é <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 20 ++++++++++++++++++++
 ts-build-prep-freebsd  |  1 +
 ts-xen-build-prep      | 19 -------------------
 3 files changed, 21 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-build-prep-freebsd b/ts-build-prep-freebsd
index e3220fa8..0ed30be4 100755
--- a/ts-build-prep-freebsd
+++ b/ts-build-prep-freebsd
@@ -38,6 +38,7 @@ sub install_deps () {
 }
 
 install_deps();
+gitcache_setup();
 
 our $path_prefix = $r{"freebsd_distpath"} ||
                    get_stashed("path_freebsddist", $r{"freebsdbuildjob"});
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2018-08-20 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 10:05 Roger Pau Monne [this message]
2018-08-20 10:40 ` [PATCH] osstest: setup git proxy for FreeBSD Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180820100533.28063-1-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).