diff options
author | Loic Dachary <loic@dachary.org> | 2014-03-29 11:51:27 +0100 |
---|---|---|
committer | Loic Dachary <loic@dachary.org> | 2014-04-02 17:57:15 +0200 |
commit | c18b97cd0295849189d877b042701b2ef51d21f8 (patch) | |
tree | 675a6c59ab08b77b57bd7e301cf5131954f9f112 /tools | |
parent | 4c84a3b6507e9d1a13b1b7e00c3227829fbeaff2 (diff) | |
download | gf-complete-c18b97cd0295849189d877b042701b2ef51d21f8.tar.gz |
add make check target and basic tests
To conveniently run tests as
$ make check
============================================================================
Testsuite summary for gf-complete 1.0
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
The run-tests.sh script loops over gf_methods and is introduced because
autotools does not allow tests to have parameters in the Makefile.am
Signed-off-by: Loic Dachary <loic@dachary.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 2 | ||||
-rwxr-xr-x | tools/run-tests.sh | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 31dffae..9e7c564 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,6 +3,8 @@ INCLUDES=-I./ -I../include AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC $(INCLUDES) +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 diff --git a/tools/run-tests.sh b/tools/run-tests.sh new file mode 100755 index 0000000..bd3cc60 --- /dev/null +++ b/tools/run-tests.sh @@ -0,0 +1,9 @@ +#!/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 |