#!/bin/sh # Usage: nightly-test set -e GMP="$1" CC="$2" BRANCH="$3" DIR=mpfr-nightly echo "BRANCH=$BRANCH" echo "GMP=$GMP" echo "CC=$CC" cd /tmp /bin/rm -fr "$DIR" mkdir "$DIR" # The following test should be useless, but let's be paranoid. test ! -h "$DIR" svn checkout "svn://scm.gforge.inria.fr/svn/mpfr/${BRANCH:-trunk}" "$DIR" cd "$DIR" autoreconf -i # -Wmissing-prototypes is not valid for C++ # add -Wno-sign-conversion because of a bug in g++ # -pedantic-errors (instead of just -pedantic) below allows us to # deactivate the support of C99 features in the configure (as they # will give an error) and to test that MPFR can be built with a # C90-only compiler. if [ "$CC" == "g++" ]; then ./configure --with-gmp="$GMP" --enable-assert=full \ --disable-shared --enable-thread-safe --enable-tests-timeout=60 \ CC="$CC" CFLAGS="-Wall -O2 -g -fstack-protector -Wno-sign-compare \ -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -ansi -pedantic-errors" else ./configure --with-gmp="$GMP" --enable-assert=full \ --disable-shared --enable-thread-safe --enable-tests-timeout=60 \ CC="$CC" CFLAGS="-Wall -Wmissing-prototypes -O2 -g -fstack-protector \ -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -ansi -pedantic" fi make export GMP_CHECK_RANDOMIZE=1 export MPFR_CHECK_MAX=1 export MPFR_SUSPICIOUS_OVERFLOW=1 export MPFR_CHECK_LIBC_PRINTF=1 make check cd /tmp /bin/rm -fr "$DIR"