Skip to content

Commit bc891e5

Browse files
committed
Merge branch 'rel_future_beta' of https://github.com/postgrespro/pg_pathman into rel_future_beta
2 parents e033506 + 757e249 commit bc891e5

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ regression.out
88
*.pyc
99
*.gcda
1010
*.gcno
11+
*.gcov
1112
pg_pathman--1.2.sql

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ env:
2020
- PGVERSION=9.5 CHECK_CODE=false
2121

2222
script: bash ./travis/pg-travis-test.sh
23+
24+
after_success:
25+
- bash <(curl -s https://codecov.io/bash)

travis/pg-travis-test.sh

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pip_packages="testgres"
1313
status=0
1414

1515
# pg_config path
16+
pg_ctl_path=/usr/lib/postgresql/$PGVERSION/bin/pg_ctl
17+
initdb_path=/usr/lib/postgresql/$PGVERSION/bin/initdb
1618
config_path=/usr/lib/postgresql/$PGVERSION/bin/pg_config
1719

1820

@@ -29,7 +31,9 @@ sudo chmod a+x /etc/init.d/postgresql
2931
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install -qq $apt_packages
3032

3133
# create cluster 'test'
32-
sudo pg_createcluster --start $PGVERSION test -p 55435 -- -A trust
34+
CLUSTER_PATH=$(pwd)/test_cluster
35+
$initdb_path -D $CLUSTER_PATH -U $USER -A trust
36+
3337

3438
# perform code analysis if necessary
3539
if [ $CHECK_CODE = "true" ]; then
@@ -61,16 +65,24 @@ if [ $CHECK_CODE = "true" ]; then
6165
make clean USE_PGXS=1 PG_CONFIG=$config_path
6266
fi
6367

64-
# build pg_pathman
65-
make USE_PGXS=1 PG_CONFIG=$config_path
68+
# build pg_pathman (using CFLAGS_SL for gcov)
69+
make USE_PGXS=1 PG_CONFIG=$config_path CFLAGS_SL="$($config_path --cflags_sl) -coverage"
6670
sudo make install USE_PGXS=1 PG_CONFIG=$config_path
6771

72+
# set permission to write postgres locks
73+
sudo chown $USER /var/run/postgresql/
74+
75+
# check build
76+
status=$?
77+
if [ $status -ne 0 ]; then exit $status; fi
78+
6879
# add pg_pathman to shared_preload_libraries and restart cluster 'test'
69-
sudo bash -c "echo \"shared_preload_libraries = 'pg_pathman'\" >> /etc/postgresql/$PGVERSION/test/postgresql.conf"
70-
sudo pg_ctlcluster $PGVERSION test restart
80+
echo "shared_preload_libraries = 'pg_pathman'" >> $CLUSTER_PATH/postgresql.conf
81+
echo "port = 55435" >> $CLUSTER_PATH/postgresql.conf
82+
$pg_ctl_path -D $CLUSTER_PATH start -l postgres.log -w
7183

7284
# run regression tests
73-
PGPORT=55435 make installcheck USE_PGXS=1 PGUSER=postgres PG_CONFIG=$config_path || status=$?
85+
PGPORT=55435 PGUSER=$USER PG_CONFIG=$config_path make installcheck USE_PGXS=1 || status=$?
7486

7587
# show diff if it exists
7688
if test -f regression.diffs; then cat regression.diffs; fi
@@ -84,13 +96,16 @@ source /tmp/envs/pg_pathman/bin/activate
8496
# install pip packages
8597
pip install $pip_packages
8698

87-
# set permission to write postgres locks
88-
sudo chmod a+w /var/run/postgresql/
89-
9099
# run python tests
91100
cd tests/python
92101
PG_CONFIG=$config_path python -m unittest partitioning_test || status=$?
102+
cd ../..
93103

94104
set -u
95105

106+
107+
#generate *.gcov files
108+
gcov src/*.c src/*.h
109+
110+
96111
exit $status

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy