]> granicus.if.org Git - postgis/commitdiff
Make Travis catch compilation errors with debug logging enabled
authorDaniel Baston <dbaston@gmail.com>
Tue, 13 Nov 2018 12:59:41 +0000 (12:59 +0000)
committerDaniel Baston <dbaston@gmail.com>
Tue, 13 Nov 2018 12:59:41 +0000 (12:59 +0000)
References #4235
Closes https://github.com/postgis/postgis/pull/330

git-svn-id: http://svn.osgeo.org/postgis/trunk@17009 b70326c6-7e19-0410-871a-916f4a2858ee

ci/travis/run_tests.sh

index d7bd40bea6e353a93bd11d8716e2e39f5f8474fa..7d5ff4854121829f9479edb28d3ab46e000b73a1 100644 (file)
@@ -4,9 +4,11 @@ set -e
 WARNINGS="-Werror -Wall -Wextra -Wformat -Werror=format-security"
 WARNINGS_DISABLED="-Wno-unused-parameter -Wno-implicit-fallthrough -Wno-unknown-warning-option -Wno-cast-function-type"
 
+# Standard flags, as we might build PostGIS for production
 CFLAGS_STD="-g -O2 -mtune=generic -fno-omit-frame-pointer ${WARNINGS} ${WARNINGS_DISABLED}"
 LDFLAGS_STD="-Wl,-Bsymbolic-functions -Wl,-z,relro"
 
+# Flags for coverage build
 CFLAGS_COV="-g -O0 --coverage"
 LDFLAGS_COV="--coverage"
 
@@ -16,8 +18,15 @@ export CUNIT_VALGRIND_FLAGS="--leak-check=full --error-exitcode=1"
 /usr/local/pgsql/bin/pg_ctl -c -l /tmp/logfile start
 ./autogen.sh
 
+# Standard build
 ./configure CFLAGS="${CFLAGS_STD}" LDFLAGS="${LDFLAGS_STD}"
 bash ./ci/travis/logbt -- make -j check RUNTESTFLAGS=--verbose
 
-./configure CFLAGS="${CFLAGS_COV}" LDFLAGS="${LDFLAGS_COV}"
+# Check that compilation works at nonzero POSTGIS_DEBUG_LEVEL
+./configure --enable-debug # sets PARANOIA_LEVEL
+sed -i 's/POSTGIS_DEBUG_LEVEL [0-9]$/POSTGIS_DEBUG_LEVEL 4/' postgis_config.h
+make
+
+# Coverage build
+./configure CFLAGS="${CFLAGS_COV}" LDFLAGS="${LDFLAGS_COV}" --enable-debug
 make -j check