From 2a2f1e306f1759e5e52771a643a3a2df54552069 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 24 Sep 2014 16:02:19 +0200 Subject: check: split unit tests and support paralell execution --- configure.ac | 2 +- tools/Makefile.am | 18 ++++++++++++++++-- tools/run-tests.sh | 9 --------- 3 files changed, 17 insertions(+), 12 deletions(-) delete mode 100755 tools/run-tests.sh diff --git a/configure.ac b/configure.ac index 02a62b8..47d5d62 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_INIT(gf-complete, 1.0) AC_PREREQ([2.61]) -AM_INIT_AUTOMAKE([no-dependencies foreign]) +AM_INIT_AUTOMAKE([no-dependencies foreign parallel-tests]) LT_INIT # libtool AC_CONFIG_HEADER(include/config.h) diff --git a/tools/Makefile.am b/tools/Makefile.am index d502623..eb27d4a 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,8 +3,6 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC -TESTS=run-tests.sh - bin_PROGRAMS = gf_mult gf_div gf_add gf_time gf_methods gf_poly gf_inline_time gf_mult_SOURCES = gf_mult.c @@ -35,3 +33,19 @@ gf_inline_time_SOURCES = gf_inline_time.c #gf_inline_time_LDFLAGS = -lgf_complete gf_inline_time_LDADD = ../src/libgf_complete.la +# gf_unit tests as generated by gf_methods +gf_unit_w%.sh: gf_methods + ./$^ $(@:gf_unit_w%.sh=%) -A -U > $@ || rm $@ + +TESTS = gf_unit_w128.sh \ + gf_unit_w64.sh \ + gf_unit_w32.sh \ + gf_unit_w16.sh \ + gf_unit_w8.sh \ + gf_unit_w4.sh + +TEST_EXTENSIONS = .sh +SH_LOG_COMPILER = $(SHELL) +AM_SH_LOG_FLAGS = -e + +CLEANFILES = $(TESTS) diff --git a/tools/run-tests.sh b/tools/run-tests.sh deleted file mode 100755 index bd3cc60..0000000 --- a/tools/run-tests.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -for w in 4 8 16 32 64 128 ; do - ./gf_methods $w -A -U | sh -e - if [ $? != "0" ] ; then - echo "Failed unit tests for w=$w" - break - fi -done -- cgit v1.2.1