From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 3/3] scripts: ignore self-generated directories in validate-abi startup check Date: Thu, 10 Mar 2016 12:47:08 +0000 Message-ID: <56E16CCC.2030403@intel.com> References: <56E16701.5060502@intel.com> <56E168C6.3060802@redhat.com> <56E169EF.3010103@intel.com> <56E16B1D.7080309@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Panu Matilainen , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0439E2E8F for ; Thu, 10 Mar 2016 13:47:10 +0100 (CET) In-Reply-To: <56E16B1D.7080309@redhat.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/10/2016 12:39 PM, Panu Matilainen wrote: > On 03/10/2016 02:34 PM, Ferruh Yigit wrote: >> On 3/10/2016 12:29 PM, Panu Matilainen wrote: >>> On 03/10/2016 02:22 PM, Ferruh Yigit wrote: >>>> On 3/10/2016 10:53 AM, Panu Matilainen wrote: >>>>> When doing multiple runs of validate-abi.sh, the git status check >>>>> will more often than not unnecessarily fail with "Working directory not >>>>> clean" error because of the compat_result and compile target directories >>>>> from the previous run. Filter out the self-generated directories >>>>> when checking. >>>>> >>>>> Signed-off-by: Panu Matilainen >>>>> --- >>>>> scripts/validate-abi.sh | 3 +-- >>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>> >>>>> diff --git a/scripts/validate-abi.sh b/scripts/validate-abi.sh >>>>> index ea60639..a21f883 100755 >>>>> --- a/scripts/validate-abi.sh >>>>> +++ b/scripts/validate-abi.sh >>>>> @@ -163,8 +163,7 @@ log "INFO" "against DPDK DSOs built from version $TAG2." >>>>> log "INFO" "" >>>>> >>>>> # Check to make sure we have a clean tree >>>>> -git status | grep -q clean >>>>> -if [ $? -ne 0 ] >>>>> +if [ $(git status --porcelain | grep -vE "($TARGET|compat_reports)" | wc -l) -ne 0 ] >>>>> then >>>>> log "WARN" "Working directory not clean, aborting" >>>>> cleanup_and_exit 1 >>>>> >>>> Hi Panu, >>>> >>>> This check catches untracked files too, does it makes sense to limit >>>> error only to modified files (local or staged)? >>> >>> I did ponder about that, untracked files seem mostly harmless in this >>> picture but erred on the side of caution. >>> >> This is something prevents me running script from working tree, and >> forces to create a new clone. > > Hmm, what untracked files you typically have in your working tree then? > cscope.out, various sym links, perf.data, and some more J, I want to keep in working directory. >>>> >>>> This also prevents specific "compat_reports" folder check. >>>> >>>> And of course mentioned change requires "git clean -fd" removed, or >>>> replaced with "make clean" >>> >>> Sorry, I dont understand you mean by these two comments. >>> >> If untracked files accepted by script, "compat_reports" exclusion is no >> more required, and "git clean -fd" needs to removed from script. > > Ah, sure. Thanks for clarifying. > > - Panu - > >> >> Regards, >> ferruh >> >