]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
TestSupport: enable cacheing git on no-reinstall hosts
authorIan Campbell <ian.campbell@citrix.com>
Fri, 27 Sep 2013 09:03:15 +0000 (10:03 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 27 Sep 2013 09:03:15 +0000 (10:03 +0100)
Host must be manually configured to have the cacheing-git script installed as
$ho-{Homedir}/bin/git and to mount the hosts git cache directory on
/volatile/git-cache.

Osstest/TestSupport.pm

index 1a3d6ea276582569936cb109a81c61652b35f3a3..8e46aa0772afc20addd871d6bd20496e793e4be0 100644 (file)
@@ -497,10 +497,12 @@ sub target_editfile_root ($$$;$$) {
 
 sub target_cmd_build ($$$$) {
     my ($ho,$timeout,$builddir,$script) = @_;
+    my $cacheing_git;
+    $cacheing_git = ":\$HOME/bin" if $ho->{Flags}{'no-reinstall'};
     target_cmd($ho, <<END.$script, $timeout);
        set -xe
         LC_ALL=C; export LC_ALL
-        PATH=/usr/lib/ccache:\$PATH:/usr/lib/git-core
+        PATH=/usr/lib/ccache$cacheing_git:\$PATH:/usr/lib/git-core
         exec </dev/null
         cd $builddir
 END