Messages in this thread | | | Date | Wed, 4 Mar 2015 21:23:01 +0900 | From | Namhyung Kim <> | Subject | Re: [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
| |