Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix postgres restore
  • Loading branch information
m-kuhn committed Sep 28, 2017
1 parent d62d9aa commit 7a84a76
Showing 1 changed file with 38 additions and 24 deletions.
62 changes: 38 additions & 24 deletions .ci/travis/linux/docker-build-test.sh
@@ -1,28 +1,26 @@
#!/usr/bin/env bash

#set -e
set -e

# locale-gen en_US.UTF-8
# export LANG=en_US.UTF-8
# export LANGUAGE=en_US:en
# export LC_ALL=en_US.UTF-8

export CTEST_PARALLEL_LEVEL=1
##############
# Setup ccache
##############
export CCACHE_TEMPDIR=/tmp
ccache -M 500M
ccache -z

cd /root/QGIS

printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
export PGUSER=docker
export PGHOST=postgres
export PGPASSWORD=docker
export PGDATABASE=qgis_test

# Build
############################
# Setup the (c)test environment
############################
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
export CTEST_BUILD_COMMAND="/usr/bin/ninja"
export CTEST_PARALLEL_LEVEL=1

mkdir -p build &&
###########
# Configure
###########
pushd /root/QGIS
mkdir -p build

pushd build

Expand All @@ -42,21 +40,37 @@ cmake \
-DDISABLE_DEPRECATED=ON \
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS} ..

export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
export CTEST_BUILD_COMMAND="/usr/bin/ninja"

ls -la --full-time python/plugins/processing/tests/testdata/expected/polys_centroid.*

#######
# Build
#######
echo "travis_fold:start:ninja-build.1"
ninja
echo "travis_fold:end:ninja-build.1"

############################
# Restore postgres test data
############################
printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
export PGUSER=docker
export PGHOST=postgres
export PGPASSWORD=docker
export PGDATABASE=qgis_test

pushd /root/QGIS
/root/QGIS/tests/testdata/provider/testdata_pg.sh
popd # /root/QGIS

###########
# Run tests
###########
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

########################
# Show ccache statistics
########################
ccache -s

popd

popd # build
popd # /root/QGIS

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

0 comments on commit 7a84a76

Please sign in to comment.