Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c21dc48

Browse files
author
Alexander Korotkov
committed
Enable asserts for travis-ci build.
1 parent 551653d commit c21dc48

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ include $(top_builddir)/src/Makefile.global
2020
include $(top_srcdir)/contrib/contrib-global.mk
2121
endif
2222

23+
ifdef USE_ASSERT_CHECKING
24+
override CFLAGS += -DUSE_ASSERT_CHECKING
25+
endif
26+
2327
installcheck: data/1.jpg.hex data/2.png.hex data/3.gif.hex data/4.jpg.hex data/5.png.hex data/6.gif.hex data/7.jpg.hex data/8.png.hex data/9.gif.hex data/10.jpg.hex data/11.png.hex data/12.gif.hex
2428

2529
data/%.hex: data/%

travis/pg-travis-test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ if [ $CHECK_CODE = "true" ]; then
3636
if [ "$CC" = "clang" ]; then
3737
sudo apt-get -y install -qq clang-$LLVM_VER
3838

39-
scan-build-$LLVM_VER --status-bugs make USE_PGXS=1 PG_CONFIG=$config_path || status=$?
39+
scan-build-$LLVM_VER --status-bugs \
40+
make USE_PGXS=1 USE_ASSERT_CHECKING=1 PG_CONFIG=$config_path || status=$?
4041
exit $status
4142

4243
elif [ "$CC" = "gcc" ]; then
@@ -71,7 +72,7 @@ ulimit -c unlimited -S
7172
echo '/tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
7273

7374
# build imgsmlr (using CFLAGS_SL for gcov)
74-
make USE_PGXS=1 PG_CONFIG=$config_path CFLAGS_SL="$($config_path --cflags_sl) -coverage"
75+
make USE_PGXS=1 USE_ASSERT_CHECKING=1 PG_CONFIG=$config_path CFLAGS_SL="$($config_path --cflags_sl) -coverage"
7576
sudo make install USE_PGXS=1 PG_CONFIG=$config_path
7677

7778
# check build

0 commit comments

Comments
 (0)