Skip to content

Commit 7a84a76

Browse files
committed
Fix postgres restore
1 parent d62d9aa commit 7a84a76

File tree

1 file changed

+38
-24
lines changed

1 file changed

+38
-24
lines changed
Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
#!/usr/bin/env bash
22

3-
#set -e
3+
set -e
44

5-
# locale-gen en_US.UTF-8
6-
# export LANG=en_US.UTF-8
7-
# export LANGUAGE=en_US:en
8-
# export LC_ALL=en_US.UTF-8
9-
10-
export CTEST_PARALLEL_LEVEL=1
5+
##############
6+
# Setup ccache
7+
##############
118
export CCACHE_TEMPDIR=/tmp
129
ccache -M 500M
1310
ccache -z
1411

15-
cd /root/QGIS
16-
17-
printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
18-
export PGUSER=docker
19-
export PGHOST=postgres
20-
export PGPASSWORD=docker
21-
export PGDATABASE=qgis_test
22-
23-
# Build
12+
############################
13+
# Setup the (c)test environment
14+
############################
15+
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
16+
export CTEST_BUILD_COMMAND="/usr/bin/ninja"
17+
export CTEST_PARALLEL_LEVEL=1
2418

25-
mkdir -p build &&
19+
###########
20+
# Configure
21+
###########
22+
pushd /root/QGIS
23+
mkdir -p build
2624

2725
pushd build
2826

@@ -42,21 +40,37 @@ cmake \
4240
-DDISABLE_DEPRECATED=ON \
4341
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS} ..
4442

45-
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
46-
export CTEST_BUILD_COMMAND="/usr/bin/ninja"
47-
48-
ls -la --full-time python/plugins/processing/tests/testdata/expected/polys_centroid.*
49-
43+
#######
44+
# Build
45+
#######
46+
echo "travis_fold:start:ninja-build.1"
5047
ninja
48+
echo "travis_fold:end:ninja-build.1"
5149

50+
############################
5251
# Restore postgres test data
52+
############################
53+
printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
54+
export PGUSER=docker
55+
export PGHOST=postgres
56+
export PGPASSWORD=docker
57+
export PGDATABASE=qgis_test
58+
59+
pushd /root/QGIS
5360
/root/QGIS/tests/testdata/provider/testdata_pg.sh
61+
popd # /root/QGIS
5462

63+
###########
64+
# Run tests
65+
###########
5566
python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V -E "$(cat /root/QGIS/.ci/travis/linux/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S /root/QGIS/.ci/travis/travis.ctest --output-on-failure
5667

68+
########################
69+
# Show ccache statistics
70+
########################
5771
ccache -s
5872

59-
popd
60-
73+
popd # build
74+
popd # /root/QGIS
6175

6276
[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log

0 commit comments

Comments
 (0)