[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [osstest PATCH] target_cmd_build: honour DistccHosts host property



Apropos of our suggestion to recommission army since marilith is
having trouble.

FYI I've just pushed this to pretest.  It seems to WFM in an ad-hoc
run of ts-xen-build worked well.  The main build took 844 seconds (the
timeout is 9000) and the whole script took about 20 mins before
crashing.

Unfortunately there is another problem which is that ts-xen-build has
been made to require root access (which osstest doesn't have on army).

Ian.

From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date: Thu, 28 Nov 2013 18:05:56 +0000
Subject: [PATCH] target_cmd_build: honour DistccHosts host property

If this property is set then the environment variable
 (a) DISTCC_HOSTS is set to the value of the host property
 (a) CCACHE_PREFIX is set to "distcc"
which will result in distcc being used as configured.

distcc had better be installed for such hosts.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 233d453..4954d84 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -501,10 +501,19 @@ sub target_editfile_root ($$$;$$) {
 
 sub target_cmd_build ($$$$) {
     my ($ho,$timeout,$builddir,$script) = @_;
-    target_cmd($ho, <<END.$script, $timeout);
+
+    my $distcc_hosts = get_host_property($ho,'DistccHosts',undef);
+    my $distcc = defined($distcc_hosts) ? <<END : "";
+        CCACHE_PREFIX=distcc
+        DISTCC_HOSTS="$distcc_hosts"
+        export CCACHE_PREFIX DISTCC_HOSTS
+END
+
+    target_cmd($ho, <<END.$distcc.<<END.$script, $timeout);
        set -xe
         LC_ALL=C; export LC_ALL
         PATH=/usr/lib/ccache:\$PATH:/usr/lib/git-core
+END
         exec </dev/null
         cd $builddir
 END
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.