Skip to content
Permalink
Browse files

test vector join: add PostgreSQL provider

  • Loading branch information
3nids committed Jan 18, 2016
1 parent c288311 commit 13ccf70e1a450eee14eb967ebb13406dec23df9b
@@ -1,4 +1,5 @@
printf "[qgis_test]\nhost=localhost\ndbname=qgis_test\nuser=postgres" > ~/.pg_service.conf
psql -c 'CREATE DATABASE qgis_test;' -U postgres
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata.sql -U postgres -d qgis_test
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/reltests.sql -U postgres -d qgis_test
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata_pg.sql -U postgres -d qgis_test
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata_pg_reltests.sql -U postgres -d qgis_test
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata_pg_vectorjoin.sql -U postgres -d qgis_test
@@ -85,7 +85,9 @@ bool QgsVectorLayerJoinBuffer::addJoin( const QgsVectorJoinInfo& joinInfo )
// but then QgsProject makes sure to call createJoinCaches() which will do the connection.
// Unique connection makes sure we do not respond to one layer's update more times (in case of multiple join)
if ( QgsVectorLayer* vl = qobject_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( joinInfo.joinLayerId ) ) )
{
connect( vl, SIGNAL( updatedFields() ), this, SLOT( joinedLayerUpdatedFields() ), Qt::UniqueConnection );
}

emit joinedFieldsChanged();
return true;
@@ -33,6 +33,13 @@ INCLUDE_DIRECTORIES(SYSTEM
ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"")

ADD_DEFINITIONS(-DINSTALL_PREFIX="\\"${CMAKE_INSTALL_PREFIX}\\"")

# enable postgresql tests
SET (ENABLE_PGTEST FALSE CACHE BOOL "Enable PostgreSQL provider tests")
IF ( ENABLE_PGTEST )
ADD_DEFINITIONS( "-DENABLE_PGTEST" )
ENDIF ()

#############################################################
# libraries

0 comments on commit 13ccf70

Please sign in to comment.
You can’t perform that action at this time.