Message ID | aecd915105148d3ac51b2a0596a5bc630ccc6ef3.1457607217.git.pmatilai@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7B2BE2E81; Thu, 10 Mar 2016 11:54:09 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5852C2BEA for <dev@dpdk.org>; Thu, 10 Mar 2016 11:54:06 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id BC52D1E40; Thu, 10 Mar 2016 10:54:05 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org.com (vpn1-4-209.ams2.redhat.com [10.36.4.209]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2AAs2w1000307; Thu, 10 Mar 2016 05:54:04 -0500 From: Panu Matilainen <pmatilai@redhat.com> To: dev@dpdk.org Date: Thu, 10 Mar 2016 12:53:37 +0200 Message-Id: <aecd915105148d3ac51b2a0596a5bc630ccc6ef3.1457607217.git.pmatilai@redhat.com> In-Reply-To: <c48db14f5764bcef620f19a1fa8d5eed1493cafd.1457607217.git.pmatilai@redhat.com> References: <c48db14f5764bcef620f19a1fa8d5eed1493cafd.1457607217.git.pmatilai@redhat.com> In-Reply-To: <c48db14f5764bcef620f19a1fa8d5eed1493cafd.1457607217.git.pmatilai@redhat.com> References: <c48db14f5764bcef620f19a1fa8d5eed1493cafd.1457607217.git.pmatilai@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Subject: [dpdk-dev] [PATCH 3/3] scripts: ignore self-generated directories in validate-abi startup check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Panu Matilainen
March 10, 2016, 10:53 a.m. UTC
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 <pmatilai@redhat.com>
---
scripts/validate-abi.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
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 <pmatilai@redhat.com> > --- > 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)? This also prevents specific "compat_reports" folder check. And of course mentioned change requires "git clean -fd" removed, or replaced with "make clean" Thanks, ferruh
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 <pmatilai@redhat.com> >> --- >> 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 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. - Panu - > Thanks, > ferruh >
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 <pmatilai@redhat.com> >>> --- >>> 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. >> >> 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. Regards, ferruh
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 <pmatilai@redhat.com> >>>> --- >>>> 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? >>> >>> 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 >
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 <pmatilai@redhat.com> >>>>> --- >>>>> 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 >> >
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