Commit 2a2f1e306f1759e5e52771a643a3a2df54552069

Authored by Janne Grunau
1 parent f6828cfb
Exists in master and in 2 other branches v2, v3

check: split unit tests and support paralell execution

configure.ac
... ... @@ -8,7 +8,7 @@ AC_INIT(gf-complete, 1.0)
8 8  
9 9 AC_PREREQ([2.61])
10 10  
11   -AM_INIT_AUTOMAKE([no-dependencies foreign])
  11 +AM_INIT_AUTOMAKE([no-dependencies foreign parallel-tests])
12 12 LT_INIT # libtool
13 13  
14 14 AC_CONFIG_HEADER(include/config.h)
... ...
tools/Makefile.am
... ... @@ -3,8 +3,6 @@
3 3 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
4 4 AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC
5 5  
6   -TESTS=run-tests.sh
7   -
8 6 bin_PROGRAMS = gf_mult gf_div gf_add gf_time gf_methods gf_poly gf_inline_time
9 7  
10 8 gf_mult_SOURCES = gf_mult.c
... ... @@ -35,3 +33,19 @@ gf_inline_time_SOURCES = gf_inline_time.c
35 33 #gf_inline_time_LDFLAGS = -lgf_complete
36 34 gf_inline_time_LDADD = ../src/libgf_complete.la
37 35  
  36 +# gf_unit tests as generated by gf_methods
  37 +gf_unit_w%.sh: gf_methods
  38 + ./$^ $(@:gf_unit_w%.sh=%) -A -U > $@ || rm $@
  39 +
  40 +TESTS = gf_unit_w128.sh \
  41 + gf_unit_w64.sh \
  42 + gf_unit_w32.sh \
  43 + gf_unit_w16.sh \
  44 + gf_unit_w8.sh \
  45 + gf_unit_w4.sh
  46 +
  47 +TEST_EXTENSIONS = .sh
  48 +SH_LOG_COMPILER = $(SHELL)
  49 +AM_SH_LOG_FLAGS = -e
  50 +
  51 +CLEANFILES = $(TESTS)
... ...
tools/run-tests.sh
... ... @@ -1,9 +0,0 @@
1   -#!/bin/bash
2   -
3   -for w in 4 8 16 32 64 128 ; do
4   - ./gf_methods $w -A -U | sh -e
5   - if [ $? != "0" ] ; then
6   - echo "Failed unit tests for w=$w"
7   - break
8   - fi
9   -done