From: Ian Jackson Subject: [OSSTEST PATCH 04/13] building: Delete when cloning, not when preparing $builddir Date: Tue, 15 Jul 2014 16:22:18 +0100 Message-ID: <1405437747-12753-5-git-send-email-ian.jackson@eu.citrix.com> References: <1405437747-12753-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X74Yw-0005iT-OU for xen-devel@lists.xenproject.org; Tue, 15 Jul 2014 15:22:38 +0000 In-Reply-To: <1405437747-12753-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Make prepbuilddirs no longer delete $builddir; instead: - have prepbuilddirs delete *-stamp files and dist/; - have build_clone delete the specific source directories; - any individual ts-*-build scripts that use other things would have to delete them (but searching for $builddir reveals none). Signed-off-by: Ian Jackson --- Osstest/BuildSupport.pm | 2 +- Osstest/TestSupport.pm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm index 0938810..874e27e 100644 --- a/Osstest/BuildSupport.pm +++ b/Osstest/BuildSupport.pm @@ -74,7 +74,7 @@ sub builddirsprops { sub prepbuilddirs { my (@xbuilddirs) = @_; - my $cmd = "rm -rf $builddir && mkdir $builddir"; + my $cmd = "mkdir -p $builddir && rm -rf $builddir/*-stamp $builddir/dist"; $cmd .= " && mkdir $builddir/$_" foreach @xbuilddirs; target_cmd($ho,$cmd,600); } diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 22dcbff..3930595 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1061,9 +1061,12 @@ sub build_clone ($$$$) { } } + my $rm = "rm -rf $subdir"; + if ($vcs eq 'hg') { target_cmd_build($ho, $timeout, $builddir, <