improve testme.sh

This commit is contained in:
Steffen Jaeckel 2017-04-11 11:43:45 +02:00
parent ff7603a309
commit e8e8fc4ccb
2 changed files with 11 additions and 1 deletions

View File

@ -6,7 +6,7 @@ script:
- make travis_mtest - make travis_mtest
- head -n 5 test.log - head -n 5 test.log
- tail -n 2 test.log - tail -n 2 test.log
- ./testme.sh --with-cc=gcc - ./testme.sh --with-cc=gcc --with-low-mp
branches: branches:
only: only:

View File

@ -43,6 +43,8 @@ _help()
echo " e.g. --make-option=\"-f makefile.shared\"" echo " e.g. --make-option=\"-f makefile.shared\""
echo " This is an option that will always be passed as parameter to make." echo " This is an option that will always be passed as parameter to make."
echo echo
echo " --with-low-mp Also build&run tests with -DMP_{8,16,32}BIT."
echo
echo "Godmode:" echo "Godmode:"
echo echo
echo " --all Choose all architectures and gcc and clang as compilers" echo " --all Choose all architectures and gcc and clang as compilers"
@ -100,6 +102,7 @@ _exit()
ARCHFLAGS="" ARCHFLAGS=""
COMPILERS="" COMPILERS=""
CFLAGS="" CFLAGS=""
WITH_LOW_MP=""
while [ $# -gt 0 ]; while [ $# -gt 0 ];
do do
@ -116,6 +119,9 @@ do
--make-option=*) --make-option=*)
MAKE_OPTIONS="$MAKE_OPTIONS ${1#*=}" MAKE_OPTIONS="$MAKE_OPTIONS ${1#*=}"
;; ;;
--with-low-mp)
WITH_LOW_MP="1"
;;
--all) --all)
COMPILERS="gcc clang" COMPILERS="gcc clang"
ARCHFLAGS="-m64 -m32 -mx32" ARCHFLAGS="-m64 -m32 -mx32"
@ -123,6 +129,9 @@ do
--help | -h) --help | -h)
_help _help
;; ;;
*)
echo "Ignoring option ${1}"
;;
esac esac
shift shift
done done
@ -176,6 +185,7 @@ do
fi fi
_runtest "$i $a" "$CFLAGS" _runtest "$i $a" "$CFLAGS"
[ "$WITH_LOW_MP" != "1" ] && continue
_runtest "$i $a" "-DMP_8BIT $CFLAGS" _runtest "$i $a" "-DMP_8BIT $CFLAGS"
_runtest "$i $a" "-DMP_16BIT $CFLAGS" _runtest "$i $a" "-DMP_16BIT $CFLAGS"
_runtest "$i $a" "-DMP_32BIT $CFLAGS" _runtest "$i $a" "-DMP_32BIT $CFLAGS"