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>master
parent
4c84a3b650
commit
c18b97cd02
4
README
4
README
|
@ -24,3 +24,7 @@ To compile, do:
|
|||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
To run the tests, do:
|
||||
|
||||
make check
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue