Skip to content

Commit 5482234

Browse files
committed
travis: switch to pg_virtualenv for testing
1 parent 4e9209f commit 5482234

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@ matrix:
5656
# ---- Linux + CLANG ---------------------------
5757
- os: linux
5858
compiler: "clang-3.8"
59-
env: T="clang38_pg92_dbtest" RUNTEST="#Dbtest" LUAJIT_OPTION="OFF"
59+
env: T="clang38_pg92_dbtest" LUAJIT_OPTION="OFF"
6060
CXXFLAGS="-pedantic -Werror"
6161
CC=clang-3.8 CXX=clang++-3.8
6262
addons: *clang38_pg92
6363

6464
- os: linux
6565
compiler: "clang-7"
66-
env: T="clang7_pg96_dbtest_luajit" RUNTEST="#Dbtest" LUAJIT_OPTION="ON"
66+
env: T="clang7_pg96_dbtest_luajit" LUAJIT_OPTION="ON"
6767
CXXFLAGS="-pedantic -Werror"
6868
CC=clang-7 CXX=clang++-7
6969
addons: *clang7_pg96
7070

7171
# ---- OSX + CLANG ---------------------------
7272
- os: osx
7373
compiler: clang
74-
env: T="osx_clang_NoDB" RUNTEST="-L NoDB" LUAJIT_OPTION="OFF"
74+
env: T="osx_clang_NoDB" LUAJIT_OPTION="OFF" TEST_NODB=1
7575
CXXFLAGS="-pedantic -Werror"
7676
before_install:
7777
- brew install lua;
@@ -83,26 +83,23 @@ matrix:
8383
# ---- Linux + GCC ---------------------------
8484
- os: linux
8585
compiler: "gcc-4.8"
86-
env: T="gcc48_pg96_dbtest" RUNTEST="#Dbtest" LUAJIT_OPTION="OFF"
86+
env: T="gcc48_pg96_dbtest" LUAJIT_OPTION="OFF"
8787
CXXFLAGS="-pedantic -Werror"
8888
CC=gcc-4.8 CXX=g++-4.8
8989
addons: *gcc48_pg96
9090

9191
- os: linux
9292
compiler: gcc-8
93-
env: T="gcc8_pg96_dbtest_luajit" RUNTEST="#Dbtest" LUAJIT_OPTION="ON"
93+
env: T="gcc8_pg96_dbtest_luajit" LUAJIT_OPTION="ON"
9494
CXXFLAGS="-pedantic -Werror"
9595
CC=gcc-8 CXX=g++-8
9696
addons: *gcc8_pg96
9797

9898

9999
before_install:
100-
- sudo mkdir -p /extra/pg/tablespacetest # for the database test
101-
- sudo chown postgres:postgres /extra/pg/tablespacetest
102100
- dpkg -l | grep -E 'lua|proj|xml|bz2|postgis|zlib|boost|expat' # checking available versions
103101
before_script:
104102
- psql -U postgres -c "SELECT version()"
105-
- psql -U postgres -c "CREATE TABLESPACE tablespacetest LOCATION '/extra/pg/tablespacetest'"
106103
- psql -U postgres -c "CREATE EXTENSION postgis"
107104
- psql -U postgres -c "CREATE EXTENSION hstore"
108105
- psql -U postgres -c "SELECT PostGIS_Full_Version()"
@@ -115,9 +112,14 @@ script:
115112
- cmake .. -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_LUAJIT=$LUAJIT_OPTION
116113
- make -j2
117114
- echo "Running tests ... "
118-
- if [[ $RUNTEST ]]; then ctest -VV $RUNTEST; fi
115+
- if [[ $TEST_NODB ]]; then
116+
ctest -VV -L NoDB;
117+
else
118+
PG_VERSION=`psql -U postgres -t -c "SELECT version()" | head -n 1 | cut -d ' ' -f 3 | cut -d . -f 1-2`;
119+
pg_virtualenv -v $PG_VERSION ctest -VV;
120+
fi
119121
after_failure:
120122
- # rerun make, but verbosely
121123
make VERBOSE=1
122124

123-
# end of .travis
125+
# end of .travis

0 commit comments

Comments
 (0)