Skip to content

Commit 1ddedf7

Browse files
committed
WIP: Ugly fix to try to make test suite run in CI
1 parent ed9e306 commit 1ddedf7

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

ci_scripts/build.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ set -e
44

55
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
66
PG_CONFIG="$SCRIPT_DIR/../../pginst/bin/pg_config"
7-
CFLAGS=-Werror
7+
CFLAGS=
88

99
cd "$SCRIPT_DIR/.."
1010

11+
BUILD_TYPE=
12+
1113
case "$1" in
1214
debug)
1315
echo "Building with debug option"
16+
BUILD_TYPE=$1
1417
;;
1518

1619
debugoptimized)
1720
echo "Building with debugoptimized option"
18-
CFLAGS+=" -O2"
21+
BUILD_TYPE=$1
1922
;;
2023

2124
sanitize)
2225
echo "Building with sanitize option"
26+
BUILD_TYPE=debug
2327
CFLAGS+=" -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-inline-functions"
2428
;;
2529

@@ -31,4 +35,6 @@ case "$1" in
3135
esac
3236

3337
export CFLAGS
34-
make PG_CONFIG="$PG_CONFIG" install -j
38+
meson setup --buildtype="$BUILD_TYPE" -Dpg_config="$PG_CONFIG" build
39+
cd build
40+
meson install

ci_scripts/dump-typedefs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
set -e
44

55
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
6-
cd "$SCRIPT_DIR/.."
6+
cd "$SCRIPT_DIR/../build"
77

88
if ! test -f pg_tde.so; then
99
echo "pg_tde.so doesn't exists, run build.sh first in debug mode"
1010
exit 1
1111
fi
1212

13-
../postgres/src/tools/find_typedef . > typedefs.list
13+
../../postgres/src/tools/find_typedef . > typedefs.list
1414

15+
cd ..
1516
make update-typedefs

ci_scripts/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
66

7-
cd "$SCRIPT_DIR/.."
7+
cd "$SCRIPT_DIR/../build"
88

99
PG_VERSION=$(../pginst/bin/pg_config --version | sed -n 's/PostgreSQL \([0-9]*\).*/\1/p')
1010

@@ -14,10 +14,10 @@ if [ "$1" = sanitize ]; then
1414
OPTS+=' --set max_stack_depth=8MB'
1515
fi
1616

17-
../pginst/bin/pg_ctl -D regress_install -l regress_install.log init -o "$OPTS"
17+
../../pginst/bin/pg_ctl -D regress_install -l regress_install.log init -o "$OPTS"
1818

19-
../pginst/bin/pg_ctl -D regress_install -l regress_install.log start
19+
../../pginst/bin/pg_ctl -D regress_install -l regress_install.log start
2020

21-
make PG_CONFIG=../pginst/bin/pg_config installcheck
21+
meson test
2222

23-
../pginst/bin/pg_ctl -D regress_install stop
23+
../../pginst/bin/pg_ctl -D regress_install stop

0 commit comments

Comments
 (0)