[postgis-tickets] r17009 - Make Travis catch compilation errors with debug logging enabled

Daniel Baston dbaston at gmail.com
Tue Nov 13 04:59:41 PST 2018


Author: dbaston
Date: 2018-11-13 04:59:41 -0800 (Tue, 13 Nov 2018)
New Revision: 17009

Modified:
   trunk/ci/travis/run_tests.sh
Log:
Make Travis catch compilation errors with debug logging enabled

References #4235
Closes https://github.com/postgis/postgis/pull/330



Modified: trunk/ci/travis/run_tests.sh
===================================================================
--- trunk/ci/travis/run_tests.sh	2018-11-13 11:10:07 UTC (rev 17008)
+++ trunk/ci/travis/run_tests.sh	2018-11-13 12:59:41 UTC (rev 17009)
@@ -4,9 +4,11 @@
 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 @@
 /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



More information about the postgis-tickets mailing list