Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25ecc76

Browse files
committed
run builds under Valgrind
1 parenta7c6c47 commit25ecc76

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

‎.travis.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ notifications:
1818
on_failure:always
1919

2020
env:
21+
-PG_VERSION=10 LEVEL=nightmare
2122
-PG_VERSION=10 LEVEL=hardcore
2223
-PG_VERSION=10
2324
-PG_VERSION=9.6
2425
-PG_VERSION=9.5
26+
27+
matrix:
28+
allow_failures:
29+
-env:PG_VERSION=10 LEVEL=nightmare

‎Dockerfile.tmpl‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ RUN apk add --no-cache \
66
perl perl-ipc-run \
77
make musl-dev gcc bison flex coreutils \
88
zlib-dev libedit-dev \
9-
clang clang-analyzer valgrind;
9+
clang clang-analyzer;
10+
11+
# Install fresh valgrind
12+
RUN apk add valgrind \
13+
--update-cache \
14+
--repository http://dl-3.alpinelinux.org/alpine/edge/main;
1015

1116
# Environment
1217
ENV LANG=C.UTF-8 PGDATA=/pg/data

‎run_tests.sh‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ set -ux
1414
status=0
1515

1616

17-
# show pg_config just in case
18-
pg_config
19-
20-
2117
# rebuild PostgreSQL with cassert + valgrind support
2218
if ["$LEVEL"="hardcore" ]|| \
2319
["$LEVEL"="nightmare" ];then
@@ -46,7 +42,7 @@ if [ "$LEVEL" = "hardcore" ] || \
4642

4743
# enable additional options
4844
./configure \
49-
--enable-debug \
45+
CFLAGS='-O0 -ggdb3 -fno-omit-frame-pointer' \
5046
--enable-cassert \
5147
--prefix=$CUSTOM_PG_BIN
5248

@@ -64,6 +60,9 @@ if [ "$LEVEL" = "hardcore" ] || \
6460
set +e
6561
fi
6662

63+
# show pg_config just in case
64+
pg_config
65+
6766
# perform code checks if asked to
6867
if ["$LEVEL"="scan-build" ]|| \
6968
["$LEVEL"="hardcore" ]|| \
@@ -81,8 +80,7 @@ fi
8180

8281

8382
# build and install extension (using PG_CPPFLAGS and SHLIB_LINK for gcov)
84-
make USE_PGXS=1 PG_CPPFLAGS="-coverage" SHLIB_LINK="-coverage"
85-
make USE_PGXS=1 install
83+
make USE_PGXS=1 PG_CPPFLAGS="-coverage" SHLIB_LINK="-coverage" install
8684

8785
# initialize database
8886
initdb -D$PGDATA
@@ -96,13 +94,16 @@ if [ "$LEVEL" = "nightmare" ]; then
9694
ls$CUSTOM_PG_BIN/bin
9795

9896
valgrind \
97+
--tool=memcheck \
9998
--leak-check=no \
10099
--time-stamp=yes \
100+
--track-origins=yes \
101101
--trace-children=yes \
102102
--gen-suppressions=all \
103103
--suppressions=$CUSTOM_PG_SRC/src/tools/valgrind.supp \
104+
--suppressions=$PWD/valgrind.supp \
104105
--log-file=/tmp/valgrind-%p.log \
105-
postgres -l /tmp/postgres.log -w|| status=$?
106+
pg_ctl start -l /tmp/postgres.log -w|| status=$?
106107
else
107108
pg_ctl start -l /tmp/postgres.log -w|| status=$?
108109
fi
@@ -132,7 +133,6 @@ if test -f regression.diffs; then cat regression.diffs; fi
132133
if [$status-ne 0 ];thenexit 1;fi
133134

134135
# generate *.gcov files
135-
rm -f*serialize.{gcda,gcno}
136136
gcov*.c*.h
137137

138138

‎valgrind.supp‎

Whitespace-only changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp