also run test vs mtest with real random data

This commit is contained in:
Steffen Jaeckel 2017-10-19 12:01:58 +02:00
parent e156e7efcf
commit aaa52a3d71
3 changed files with 13 additions and 4 deletions

View File

@ -19,7 +19,9 @@ script:
- ./testme.sh --with-cc=$CC ${BUILDOPTIONS}
env:
- |
BUILDOPTIONS="--test-vs-mtest=666666"
BUILDOPTIONS="--test-vs-mtest=333333"
- |
BUILDOPTIONS="--test-vs-mtest=333333 --mtest-real-rand"
- |
BUILDOPTIONS="--with-low-mp"
- |

View File

@ -151,8 +151,9 @@ int main(int argc, char *argv[])
if (rng == NULL) {
rng = fopen("/dev/random", "rb");
if (rng == NULL) {
fprintf(stderr, "\nWarning: stdin used as random source\n\n");
rng = stdin;
fprintf(stderr, "\nWarning: no /dev/[u]random available\n\n");
printf("exit\n");
return 1;
}
}
#else

View File

@ -48,6 +48,8 @@ _help()
echo
echo " --with-low-mp Also build&run tests with -DMP_{8,16,32}BIT."
echo
echo " --mtest-real-rand Use real random data when running mtest."
echo
echo "Godmode:"
echo
echo " --all Choose all architectures and gcc and clang as compilers"
@ -115,6 +117,7 @@ COMPILERS=""
CFLAGS=""
WITH_LOW_MP=""
TEST_VS_MTEST=""
MTEST_RAND=""
while [ $# -gt 0 ];
do
@ -142,6 +145,9 @@ do
exit -1
fi
;;
--mtest-real-rand)
MTEST_RAND="-DLTM_MTEST_REAL_RAND"
;;
--all)
COMPILERS="gcc clang"
ARCHFLAGS="-m64 -m32 -mx32"
@ -184,7 +190,7 @@ then
make clean > /dev/null
_make "${compilers[0]} ${archflags[0]}" "$CFLAGS" "test"
echo
_make "gcc" "" "mtest"
_make "gcc" "$MTEST_RAND" "mtest"
echo
echo "Run test vs. mtest for $TEST_VS_MTEST iterations"
for i in `seq 1 10` ; do sleep 500 && echo alive; done &