summaryrefslogtreecommitdiff
path: root/tools/travis-test.sh
diff options
context:
space:
mode:
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