summaryrefslogtreecommitdiff
path: root/tools/travis-test.sh
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2015-07-03 00:40:10 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2015-07-03 01:26:27 +0200
commitbb4682a091e9652bfd886a686b3fa85a9636028d (patch)
treeb7e70bc550576d4f8322d963dde11e29fde1fad0 /tools/travis-test.sh
parentc15f7747c78e3e8b492ac4b1ef298b51bbae428f (diff)
downloadpython-numpy-bb4682a091e9652bfd886a686b3fa85a9636028d.tar.gz
python-numpy-bb4682a091e9652bfd886a686b3fa85a9636028d.tar.bz2
python-numpy-bb4682a091e9652bfd886a686b3fa85a9636028d.zip
TST: fail tests on compiler warnings
Diffstat (limited to 'tools/travis-test.sh')
-rwxr-xr-xtools/travis-test.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index 705876f56..4b6a39c25 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -23,7 +23,16 @@ setup_base()
# install' also has the advantage that it tests that numpy is 'pip
# install' compatible, see e.g. gh-2766...
if [ -z "$USE_DEBUG" ]; then
- $PIP install .
+ if [ -z "$IN_CHROOT" ]; then
+ $PIP install .
+ else
+ sysflags="$($PYTHON -c "from distutils import sysconfig; print (sysconfig.get_config_var('CFLAGS'))")"
+ # windows compilers have this requirement
+ CFLAGS="$sysflags -Werror=declaration-after-statement -Werror=nonnull -Wlogical-op" $PIP install . 2>&1 | tee log
+ grep -v "_configtest" log | grep -vE "ld returned 1|no previously-included files matching" | grep -E "warning\>";
+ # accept a mysterious memset warning that shows with -flto
+ test $(grep -v "_configtest" log | grep -vE "ld returned 1|no previously-included files matching" | grep -E "warning\>" -c) -lt 2;
+ fi
else
sysflags="$($PYTHON -c "from distutils import sysconfig; print (sysconfig.get_config_var('CFLAGS'))")"
# windows compilers have this requirement
@@ -139,7 +148,7 @@ elif [ -n "$USE_CHROOT" ] && [ $# -eq 0 ]; then
DIR=/chroot
setup_chroot $DIR
# run again in chroot with this time testing
- sudo linux32 chroot $DIR bash -c "cd numpy && PYTHON=python3 PIP=pip3 $0 test"
+ sudo linux32 chroot $DIR bash -c "cd numpy && PYTHON=python3 PIP=pip3 IN_CHROOT=1 $0 test"
elif [ -n "$USE_BENTO" ] && [ $# -eq 0 ]; then
setup_bento
# run again this time testing