summaryrefslogtreecommitdiff
path: root/tools/nightly-test
blob: 45882535db2d90ac6f491688d73d927b1db2f569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Usage: nightly-test <GMPDIR> <CC> <BRANCH>
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"
./autogen.sh
# -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 --enable-decimal-float \
   --enable-float128 \
   --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
# removed -ansi since it is incompatible with --enable-decimal-float
   ./configure --with-gmp="$GMP" --enable-assert=full --enable-decimal-float \
   --enable-float128 \
   --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 -pedantic -Wlogical-op"
fi
make
export GMP_CHECK_RANDOMIZE=1
export MPFR_SUSPICIOUS_OVERFLOW=1
export MPFR_CHECK_LIBC_PRINTF=1
export MPFR_SKIP_EXTREME=1
# The VERBOSE=1 allows tests/test-suite.log to be output in case of failure.
VERBOSE=1 make check
# reconfigure for mpfrbench
make distclean
if [ "$CC" = "g++" ]; then
   ./configure --with-gmp="$GMP" --disable-shared CC="$CC"
else
# removed -ansi since it is incompatible with --enable-decimal-float
   ./configure --with-gmp="$GMP" --disable-shared
fi
make
cd tools/bench
make mpfrbench
./mpfrbench
cd /tmp
/bin/rm -fr "$DIR"