[PATCH 2/3] tests: add strace-V.test

Dmitry V. Levin ldv at altlinux.org
Fri May 6 10:36:38 UTC 2016


On Thu, May 05, 2016 at 03:19:50PM +0800, Fei Jie wrote:
> * tests/strace-V.test: New test.
> * tests/Makefile.am (MISC_TESTS): Add it.
> ---
>  tests/Makefile.am   |  1 +
>  tests/strace-V.test | 15 +++++++++++++++
>  2 files changed, 16 insertions(+)
>  create mode 100755 tests/strace-V.test
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 41f03fb..25afb99 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -600,6 +600,7 @@ MISC_TESTS = \
>  	redirect.test \
>  	restart_syscall.test \
>  	strace-T.test \
> +	strace-V.test \
>  	strace-f.test \
>  	strace-ff.test \
>  	strace-r.test \
> diff --git a/tests/strace-V.test b/tests/strace-V.test
> new file mode 100755
> index 0000000..63a91a1
> --- /dev/null
> +++ b/tests/strace-V.test
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +# Check -V option.
> +
> +. "${srcdir=.}/init.sh"
> +
> +run_strace -V > "$LOG"
> +
> +PACKAGE=`grep '\<PACKAGE_NAME\>' ../config.h | awk '{print $3}' | sed 's/\"//g'`

PACKAGE="$(sed -n 's/#define[[:space:]]*PACKAGE_NAME[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h)"

> +VERSION=`grep '\<VERSION\>' ../config.h | awk '{print $3}' | sed 's/\"//g'`
> +
> +echo "$PACKAGE" -- version "$VERSION" > "$OUT"

printf "%s -- version %s\n" "$PACKAGE_NAME" "$VERSION" > "$OUT"


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160506/92a33fc2/attachment.bin>


More information about the Strace-devel mailing list