[dpdk-dev] [PATCH 3/3] scripts: ignore self-generated directories in validate-abi startup check

Ferruh Yigit ferruh.yigit at intel.com
Thu Mar 10 13:22:25 CET 2016


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 at 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


More information about the dev mailing list