Re: [PATCH 12/14] tools build: Allow to override feature checks setup
From: Namhyung Kim
Date: Wed Mar 04 2015 - 07:23:48 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/