Skip to content

Commit c3124ed

Browse files
committed
refactoring, add missing deps
1 parent af6e719 commit c3124ed

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

Dockerfile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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-analyzer valgrind;
9+
clang clang-analyzer valgrind;
1010

1111
# Environment
1212
ENV LANG=C.UTF-8 PGDATA=/pg/data

run_tests.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,9 @@ status=0
1818
pg_config
1919

2020

21-
# perform code checks if asked to
22-
if [ "$LEVEL" = "scan-build" ]; then
23-
24-
# perform static analyzis
25-
scan-build --status-bugs make USE_PGXS=1 || status=$?
26-
27-
# something's wrong, exit now!
28-
if [ $status -ne 0 ]; then exit 1; fi
29-
30-
# don't forget to "make clean"
31-
make USE_PGXS=1 clean
32-
fi
33-
34-
# build with cassert + valgrind support
35-
if [ "$LEVEL" = "hardcore" ] || [ "$LEVEL" = "nightmare" ]; then
21+
# rebuild PostgreSQL with cassert + valgrind support
22+
if [ "$LEVEL" = "hardcore" ] || \
23+
[ "$LEVEL" = "nightmare" ]; then
3624

3725
set -e
3826

@@ -76,6 +64,22 @@ if [ "$LEVEL" = "hardcore" ] || [ "$LEVEL" = "nightmare" ]; then
7664
set +e
7765
fi
7866

67+
# perform code checks if asked to
68+
if [ "$LEVEL" = "scan-build" ] || \
69+
[ "$LEVEL" = "hardcore" ] || \
70+
[ "$LEVEL" = "nightmare" ]; then
71+
72+
# perform static analyzis
73+
scan-build --status-bugs make USE_PGXS=1 || status=$?
74+
75+
# something's wrong, exit now!
76+
if [ $status -ne 0 ]; then exit 1; fi
77+
78+
# don't forget to "make clean"
79+
make USE_PGXS=1 clean
80+
fi
81+
82+
7983
# build and install extension (using PG_CPPFLAGS and SHLIB_LINK for gcov)
8084
make USE_PGXS=1 PG_CPPFLAGS="-coverage" SHLIB_LINK="-coverage"
8185
make USE_PGXS=1 install

0 commit comments

Comments
 (0)