Commit e8e8fc4ccbf6c35c6559d9876fbafefa1cf15fd3

Steffen Jaeckel 2017-04-11T11:43:45

improve testme.sh

diff --git a/.travis.yml b/.travis.yml
index 48e12b2..ba90ded 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ script:
   - make travis_mtest
   - head -n 5 test.log
   - tail -n 2 test.log
-  - ./testme.sh --with-cc=gcc
+  - ./testme.sh --with-cc=gcc --with-low-mp
 
 branches:
   only:
diff --git a/testme.sh b/testme.sh
index ff54078..a65e2f8 100755
--- a/testme.sh
+++ b/testme.sh
@@ -43,6 +43,8 @@ _help()
   echo "                            e.g. --make-option=\"-f makefile.shared\""
   echo "        This is an option that will always be passed as parameter to make."
   echo
+  echo "    --with-low-mp           Also build&run tests with -DMP_{8,16,32}BIT."
+  echo
   echo "Godmode:"
   echo
   echo "    --all                   Choose all architectures and gcc and clang as compilers"
@@ -100,6 +102,7 @@ _exit()
 ARCHFLAGS=""
 COMPILERS=""
 CFLAGS=""
+WITH_LOW_MP=""
 
 while [ $# -gt 0 ];
 do
@@ -116,6 +119,9 @@ do
     --make-option=*)
       MAKE_OPTIONS="$MAKE_OPTIONS ${1#*=}"
     ;;
+    --with-low-mp)
+      WITH_LOW_MP="1"
+    ;;
     --all)
       COMPILERS="gcc clang"
       ARCHFLAGS="-m64 -m32 -mx32"
@@ -123,6 +129,9 @@ do
     --help | -h)
       _help
     ;;
+    *)
+      echo "Ignoring option ${1}"
+    ;;
   esac
   shift
 done
@@ -176,6 +185,7 @@ do
     fi
 
     _runtest "$i $a" "$CFLAGS"
+    [ "$WITH_LOW_MP" != "1" ] && continue
     _runtest "$i $a" "-DMP_8BIT $CFLAGS"
     _runtest "$i $a" "-DMP_16BIT $CFLAGS"
     _runtest "$i $a" "-DMP_32BIT $CFLAGS"