lkml.org 
[lkml]   [2015]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/14] tools build: Allow to override feature checks setup
On Tue, Mar 03, 2015 at 03:26:35PM +0100, Jiri Olsa wrote:
> diff --git a/tools/build/tests/features/Makefile b/tools/build/tests/features/Makefile
> new file mode 100644
> index 000000000000..31782a1d3758
> --- /dev/null
> +++ b/tools/build/tests/features/Makefile
> @@ -0,0 +1,23 @@
> +all: test1
> +
> +test1:
> + rm -f FEATURE-DUMP
> + make -f Makefile.test1 > out
> + # we should get one line with 'glibc' feature status
> + features=`cat out | grep '\.\.\.' | wc -l`; \

It seems this `cat | grep | wc -l` pipeline can be replaced with a
single `grep -cF ... out` command.

Thanks,
Namhyung


> + if [ "$$features" != "1" ]; then echo FAILED; exit 1; fi
> + # we should NOT get any feature status line on second run
> + make -f Makefile.test1 > out
> + features=`cat out | grep '\.\.\.' | wc -l`; \
> + if [ "$$features" == "1" ]; then echo FAILED; exit 1; fi
> + # we should get both 'glibc' and 'backtrace' status lines now
> + make -f Makefile.test1 VF=1 > out
> + features=`cat out | grep '\.\.\.' | wc -l`; \
> + if [ "$$features" != "2" ]; then echo FAILED; exit 1; fi
> + # and fresh start without FEATURE-DUMP, expecting 'glibc' status line
> + rm -f FEATURE-DUMP
> + make -f Makefile.test1 > out
> + features=`cat out | grep '\.\.\.' | wc -l`; \
> + if [ "$$features" != "1" ]; then echo FAILED; exit 1; fi
> + # cleanup
> + rm -f FEATURE-DUMP out


\
 
 \ /
  Last update: 2015-03-04 13:41    [W:0.151 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site