From c2ba427b52e237bec5b66496bf8ea0ac97399f14 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 10 Jan 2018 13:06:22 +0100 Subject: [PATCH] tests: Migrate convtest util to autotest infrastructure Change-Id: Ie682abf7e83de436d0f37f9f6e0664cb2f4d0c9e --- .gitignore | 1 + configure.ac | 1 + tests/Makefile.am | 1 + tests/Transceiver52M/Makefile.am | 17 +++++++++++++++++ .../Transceiver52M/convolve_test.c | 0 .../Transceiver52M/convolve_test.ok | 0 tests/testsuite.at | 6 ++++++ utils/convolvetest/Makefile | 18 ------------------ 8 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 tests/Transceiver52M/Makefile.am rename utils/convolvetest/main.c => tests/Transceiver52M/convolve_test.c (100%) rename utils/convolvetest/convtest.ok => tests/Transceiver52M/convolve_test.ok (100%) delete mode 100644 utils/convolvetest/Makefile diff --git a/.gitignore b/.gitignore index bc6c0361..2cc1b8fa 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ tests/CommonLibs/TimevalTest tests/CommonLibs/URLEncodeTest tests/CommonLibs/VectorTest tests/CommonLibs/PRBSTest +tests/Transceiver52M/convolve_test # automake/autoconf *.in diff --git a/configure.ac b/configure.ac index 3ad4b413..5cee4a6c 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,7 @@ AC_CONFIG_FILES([\ Transceiver52M/x86/Makefile \ tests/Makefile \ tests/CommonLibs/Makefile \ + tests/Transceiver52M/Makefile \ ]) AC_OUTPUT diff --git a/tests/Makefile.am b/tests/Makefile.am index c18bef3c..d4589a4f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,6 @@ SUBDIRS = \ CommonLibs \ + Transceiver52M \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/Transceiver52M/Makefile.am b/tests/Transceiver52M/Makefile.am new file mode 100644 index 00000000..79f73c6a --- /dev/null +++ b/tests/Transceiver52M/Makefile.am @@ -0,0 +1,17 @@ +include $(top_srcdir)/Makefile.common + +AM_CFLAGS = -Wall -I$(top_srcdir)/Transciever52 $(STD_DEFINES_AND_INCLUDES) -g + +EXTRA_DIST = convolve_test.ok + +noinst_PROGRAMS = \ + convolve_test + +convolve_test_SOURCES = convolve_test.c +convolve_test_LDADD = $(COMMON_LA) $(ARCH_LA) +if HAVE_SSE3 +convolve_test_CFLAGS = $(AM_CFLAGS) $(SIMD_FLAGS) +endif +if HAVE_SSE4_1 +convolve_test_CFLAGS = $(AM_CFLAGS) $(SIMD_FLAGS) +endif diff --git a/utils/convolvetest/main.c b/tests/Transceiver52M/convolve_test.c similarity index 100% rename from utils/convolvetest/main.c rename to tests/Transceiver52M/convolve_test.c diff --git a/utils/convolvetest/convtest.ok b/tests/Transceiver52M/convolve_test.ok similarity index 100% rename from utils/convolvetest/convtest.ok rename to tests/Transceiver52M/convolve_test.ok diff --git a/tests/testsuite.at b/tests/testsuite.at index 00e60023..c6ca848f 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -43,3 +43,9 @@ AT_KEYWORDS([VectorTest]) cat $abs_srcdir/CommonLibs/VectorTest.ok > expout AT_CHECK([$abs_top_builddir/tests/CommonLibs/VectorTest], [], [expout], []) AT_CLEANUP + +AT_SETUP([convolve_test]) +AT_KEYWORDS([convolve_test]) +cat $abs_srcdir/Transceiver52M/convolve_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/Transceiver52M/convolve_test], [], [expout], []) +AT_CLEANUP diff --git a/utils/convolvetest/Makefile b/utils/convolvetest/Makefile deleted file mode 100644 index 1163d679..00000000 --- a/utils/convolvetest/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -all: main.o convolve_base.o convolve.o convolve_sse_3.o - gcc -g -Wall ./*.o -o convtest - -clean: - rm -f ./*.o - rm -f ./convtest - -main.o: main.c - gcc -g -Wall -c main.c - -convolve_base.o: ../../Transceiver52M/common/convolve_base.c - gcc -std=c99 -c ../../Transceiver52M/common/convolve_base.c - -convolve.o: ../../Transceiver52M/x86/convolve.c - gcc -std=c99 -c ../../Transceiver52M/x86/convolve.c -I ../../Transceiver52M/common/ -msse3 -DHAVE_SSE3 - -convolve_sse_3.o: ../../Transceiver52M/x86/convolve_sse_3.c - gcc -std=c99 -c ../../Transceiver52M/x86/convolve_sse_3.c -I ../../Transceiver52M/common/ -msse3 -DHAVE_SSE3