tests: Migrate convtest util to autotest infrastructure

Change-Id: Ie682abf7e83de436d0f37f9f6e0664cb2f4d0c9e
This commit is contained in:
Pau Espin 2018-01-10 13:06:22 +01:00
parent 611212676b
commit c2ba427b52
8 changed files with 26 additions and 18 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ tests/CommonLibs/TimevalTest
tests/CommonLibs/URLEncodeTest
tests/CommonLibs/VectorTest
tests/CommonLibs/PRBSTest
tests/Transceiver52M/convolve_test
# automake/autoconf
*.in

View File

@ -174,6 +174,7 @@ AC_CONFIG_FILES([\
Transceiver52M/x86/Makefile \
tests/Makefile \
tests/CommonLibs/Makefile \
tests/Transceiver52M/Makefile \
])
AC_OUTPUT

View File

@ -1,5 +1,6 @@
SUBDIRS = \
CommonLibs \
Transceiver52M \
$(NULL)
# The `:;' works around a Bash 3.2 bug when the output is not writeable.

View File

@ -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

View File

@ -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

View File

@ -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