add testme.sh

This commit is contained in:
Steffen Jaeckel 2014-12-11 14:59:35 +01:00
parent 784077d380
commit 0fd5e6c17f
2 changed files with 27 additions and 0 deletions

3
.gitignore vendored
View File

@ -41,3 +41,6 @@ mtest.exe
*.pdf
*.out
tommath.tex
# ignore files generated by testme.sh
test_*.txt

24
testme.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash -e
_runtest()
{
echo "Run test $1 $2"
make clean > /dev/null
CC="$1" CFLAGS="$2" make test_standalone -j9 > /dev/null 2>test_gcc_errors.txt
./test > test_$(echo ${1}${2} | tr ' ' '_').txt
}
_runtest "gcc" ""
_runtest "gcc" "-DMP_8BIT"
_runtest "gcc" "-DMP_16BIT"
_runtest "gcc" "-DMP_32BIT"
_runtest "gcc -m32" ""
_runtest "gcc -m32" "-DMP_8BIT"
# mh, this configuration does not work! it gets stuck at
# Testing (not safe-prime): 46 bits
#_runtest "gcc -m32" "-DMP_16BIT"
_runtest "gcc -m32" "-DMP_32BIT"
_runtest "gcc -mx32" ""
_runtest "gcc -mx32" "-DMP_8BIT"
_runtest "gcc -mx32" "-DMP_16BIT"
_runtest "gcc -mx32" "-DMP_32BIT"