[Spice-devel] [PATCH spice-streaming-agent] tests: Fix tests names
Lukáš Hrázký
lhrazky at redhat.com
Tue Feb 13 13:39:53 UTC 2018
On Tue, 2018-02-13 at 13:33 +0000, Frediano Ziglio wrote:
> The test-hexdump was more an utility to test hexdump function instead
> of a proper test.
> Rename hexdump.sh to test-hexdump as this is the real test executed
> during "make check".
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> src/unittests/.gitignore | 2 +-
> src/unittests/Makefile.am | 16 ++++++----------
> src/unittests/{test-hexdump.c => hexdump.c} | 0
> src/unittests/{hexdump.sh => test-hexdump} | 2 +-
> 4 files changed, 8 insertions(+), 12 deletions(-)
> rename src/unittests/{test-hexdump.c => hexdump.c} (100%)
> rename src/unittests/{hexdump.sh => test-hexdump} (91%)
I would prefer the name to be test-hexdump.sh if it's a shell script.
> diff --git a/src/unittests/.gitignore b/src/unittests/.gitignore
> index 36548a1..bb238d7 100644
> --- a/src/unittests/.gitignore
> +++ b/src/unittests/.gitignore
> @@ -1 +1 @@
> -/test-hexdump
> +/hexdump
> diff --git a/src/unittests/Makefile.am b/src/unittests/Makefile.am
> index ef6c253..1dbdb11 100644
> --- a/src/unittests/Makefile.am
> +++ b/src/unittests/Makefile.am
> @@ -13,27 +13,23 @@ AM_CFLAGS = \
> $(NULL)
>
> check_PROGRAMS = \
> - test-hexdump \
> + hexdump \
> $(NULL)
>
> TESTS = \
> - hexdump.sh \
> - $(NULL)
> -
> -noinst_PROGRAMS = \
> - $(check_PROGRAMS) \
I take it noinst_PROGRAMS is not needed here, if you removed it? You
didn't mention it in the commit message. It's a minor thing, just
making sure this was intentional.
> + test-hexdump \
> $(NULL)
>
> -test_hexdump_SOURCES = \
> - test-hexdump.c \
> +hexdump_SOURCES = \
> + hexdump.c \
> $(NULL)
>
> -test_hexdump_LDADD = \
> +hexdump_LDADD = \
> ../libstreaming-utils.a \
> $(NULL)
>
> EXTRA_DIST = \
> - hexdump.sh \
> + test-hexdump \
> hexdump1.in \
> hexdump1.out \
> hexdump2.in \
> diff --git a/src/unittests/test-hexdump.c b/src/unittests/hexdump.c
> similarity index 100%
> rename from src/unittests/test-hexdump.c
> rename to src/unittests/hexdump.c
> diff --git a/src/unittests/hexdump.sh b/src/unittests/test-hexdump
> similarity index 91%
> rename from src/unittests/hexdump.sh
> rename to src/unittests/test-hexdump
> index 691b264..69fc7aa 100755
> --- a/src/unittests/hexdump.sh
> +++ b/src/unittests/test-hexdump
> @@ -12,7 +12,7 @@ for f in "$SRCDIR"/hexdump*.in; do
> reference=`echo $f | sed 's,\.in,.out,'`
> out=`basename $reference`.test
> rm -f $out
> - ./test-hexdump $out < $f
> + ./hexdump $out < $f
> cmp $out $reference
> rm -f $out
> done
More information about the Spice-devel
mailing list