summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-03-06 15:24:57 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-03-07 09:52:25 +0000
commit31ff679359172dfa068014ab0537418f5b852eac (patch)
tree6cc22138efc1e565ca1f415505b1fb94c7548e80 /tests
parent181511ef5c8a86c09a1bd953bdfd5fa603515148 (diff)
downloadqtlocation-31ff679359172dfa068014ab0537418f5b852eac.tar.gz
Don't try to set library paths if !QT_CONFIG(library)
Change-Id: I1774d2b4c637f5057691f43275e10f19b986c722 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_core/main.cpp2
-rw-r--r--tests/auto/declarative_ui/main.cpp2
-rw-r--r--tests/auto/positionplugintest/tst_positionplugin.cpp2
-rw-r--r--tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp2
-rw-r--r--tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp2
-rw-r--r--tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp2
-rw-r--r--tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp2
-rw-r--r--tests/auto/qgeoserviceprovider/tst_qgeoserviceprovider.cpp2
-rw-r--r--tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp2
-rw-r--r--tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp2
-rw-r--r--tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp2
-rw-r--r--tests/auto/qplacemanager/tst_qplacemanager.cpp2
-rw-r--r--tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp2
13 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/declarative_core/main.cpp b/tests/auto/declarative_core/main.cpp
index 041dbb7e..b380a231 100644
--- a/tests/auto/declarative_core/main.cpp
+++ b/tests/auto/declarative_core/main.cpp
@@ -31,6 +31,7 @@
static void initializeLibraryPath()
{
+#if QT_CONFIG(library)
// Set custom path since CI doesn't install test plugins
#ifdef Q_OS_WIN
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
@@ -39,6 +40,7 @@ static void initializeLibraryPath()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
QStringLiteral("/../../../plugins"));
#endif
+#endif
}
Q_COREAPP_STARTUP_FUNCTION(initializeLibraryPath)
diff --git a/tests/auto/declarative_ui/main.cpp b/tests/auto/declarative_ui/main.cpp
index 8a12f411..49e64bc0 100644
--- a/tests/auto/declarative_ui/main.cpp
+++ b/tests/auto/declarative_ui/main.cpp
@@ -31,6 +31,7 @@
static void initializeLibraryPath()
{
+#if QT_CONFIG(library)
// Set custom path since CI doesn't install test plugins
#ifdef Q_OS_WIN
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
@@ -39,6 +40,7 @@ static void initializeLibraryPath()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
QStringLiteral("/../../../plugins"));
#endif
+#endif
}
Q_COREAPP_STARTUP_FUNCTION(initializeLibraryPath)
diff --git a/tests/auto/positionplugintest/tst_positionplugin.cpp b/tests/auto/positionplugintest/tst_positionplugin.cpp
index 34d05094..6e8847b8 100644
--- a/tests/auto/positionplugintest/tst_positionplugin.cpp
+++ b/tests/auto/positionplugintest/tst_positionplugin.cpp
@@ -53,6 +53,7 @@ private slots:
void tst_PositionPlugin::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -63,6 +64,7 @@ void tst_PositionPlugin::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
qRegisterMetaType<QGeoPositionInfo>();
}
diff --git a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
index 55261984..75c1eecb 100644
--- a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
+++ b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
@@ -77,6 +77,7 @@ class tst_QGeoAreaMonitorSource : public QObject
private slots:
void initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install plugins
*/
@@ -87,6 +88,7 @@ private slots:
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
qRegisterMetaType<QGeoPositionInfo>();
qRegisterMetaType<QGeoAreaMonitorInfo>();
}
diff --git a/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp b/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
index 581b3c4e..9647c0d6 100644
--- a/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
+++ b/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
@@ -35,6 +35,7 @@ QT_USE_NAMESPACE
void tst_QGeoCodingManager::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -45,6 +46,7 @@ void tst_QGeoCodingManager::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
tst_QGeoCodingManager::loadGeocodingManager();
}
diff --git a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
index 31ab86f3..0fc8f492 100644
--- a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
+++ b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
@@ -109,6 +109,7 @@ TestQGeoPositionInfoSource::TestQGeoPositionInfoSource(QObject *parent)
: QObject(parent)
{
m_testingDefaultSource = false;
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -119,6 +120,7 @@ TestQGeoPositionInfoSource::TestQGeoPositionInfoSource(QObject *parent)
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
}
TestQGeoPositionInfoSource *TestQGeoPositionInfoSource::createDefaultSourceTest()
diff --git a/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp b/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
index 4dbeea55..dc519b48 100644
--- a/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
+++ b/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
@@ -35,6 +35,7 @@ QT_USE_NAMESPACE
void tst_QGeoRoutingManager::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -45,6 +46,7 @@ void tst_QGeoRoutingManager::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
tst_QGeoRoutingManager::loadRoutingManager();
}
diff --git a/tests/auto/qgeoserviceprovider/tst_qgeoserviceprovider.cpp b/tests/auto/qgeoserviceprovider/tst_qgeoserviceprovider.cpp
index 121253fa..7303e431 100644
--- a/tests/auto/qgeoserviceprovider/tst_qgeoserviceprovider.cpp
+++ b/tests/auto/qgeoserviceprovider/tst_qgeoserviceprovider.cpp
@@ -48,6 +48,7 @@ private slots:
void tst_QGeoServiceProvider::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -58,6 +59,7 @@ void tst_QGeoServiceProvider::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
}
void tst_QGeoServiceProvider::tst_availableServiceProvider()
diff --git a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp
index cc2672b2..480e7d60 100644
--- a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp
+++ b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp
@@ -91,6 +91,7 @@ tst_QGeoTiledMap::~tst_QGeoTiledMap()
void tst_QGeoTiledMap::initTestCase()
{
+#if QT_CONFIG(library)
// Set custom path since CI doesn't install test plugins
#ifdef Q_OS_WIN
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
@@ -99,6 +100,7 @@ void tst_QGeoTiledMap::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() +
QStringLiteral("/../../../plugins"));
#endif
+#endif
QVariantMap parameters;
parameters["tileSize"] = 16;
parameters["maxZoomLevel"] = 8;
diff --git a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp
index cedcd56a..d3f03c0d 100644
--- a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp
+++ b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp
@@ -38,6 +38,7 @@ public:
tst_QNmeaPositionInfoSource_RealTime_Generic()
{
m_factory = new QNmeaPositionInfoSourceProxyFactory;
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -48,6 +49,7 @@ public:
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../../plugins"));
#endif
+#endif
}
~tst_QNmeaPositionInfoSource_RealTime_Generic()
diff --git a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp
index 0d8f03c9..adc55f64 100644
--- a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp
+++ b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp
@@ -36,6 +36,7 @@ class tst_QNmeaPositionInfoSource_Simulation_Generic : public TestQGeoPositionIn
public:
tst_QNmeaPositionInfoSource_Simulation_Generic()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -46,6 +47,7 @@ public:
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../../plugins"));
#endif
+#endif
}
protected:
diff --git a/tests/auto/qplacemanager/tst_qplacemanager.cpp b/tests/auto/qplacemanager/tst_qplacemanager.cpp
index fe97b37c..2cb035cd 100644
--- a/tests/auto/qplacemanager/tst_qplacemanager.cpp
+++ b/tests/auto/qplacemanager/tst_qplacemanager.cpp
@@ -72,6 +72,7 @@ private:
void tst_QPlaceManager::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -82,6 +83,7 @@ void tst_QPlaceManager::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
provider = 0;
QStringList providers = QGeoServiceProvider::availableServiceProviders();
diff --git a/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp b/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp
index 41716103..98a9dd31 100644
--- a/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp
+++ b/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp
@@ -75,6 +75,7 @@ private:
void tst_QPlaceManagerUnsupported::initTestCase()
{
+#if QT_CONFIG(library)
/*
* Set custom path since CI doesn't install test plugins
*/
@@ -85,6 +86,7 @@ void tst_QPlaceManagerUnsupported::initTestCase()
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ QStringLiteral("/../../../plugins"));
#endif
+#endif
m_provider = 0;
m_manager = 0;