summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2014-09-24 16:02:19 +0200
committerJanne Grunau <j@jannau.net>2014-10-09 23:22:29 +0200
commit2a2f1e306f1759e5e52771a643a3a2df54552069 (patch)
tree694c722ba9468fa57f615d6bcca0ab5ec6dbec8d
parentf6828cfbc1bf24d686e6e24ce9822e69f824351d (diff)
downloadgf-complete-2a2f1e306f1759e5e52771a643a3a2df54552069.tar.gz
check: split unit tests and support paralell execution
-rw-r--r--configure.ac2
-rw-r--r--tools/Makefile.am18
-rwxr-xr-xtools/run-tests.sh9
3 files changed, 17 insertions, 12 deletions
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