summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-07-10 16:29:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-11 17:03:53 +0200
commitc955dcea2df9378a45d53d5556a1f726bcf05306 (patch)
tree3fdf45b683e653157558ac111eed40104155af67 /tests/auto
parenta2bab88a3c5fa89580031d2cee62c67c943dca9d (diff)
downloadqtlocation-c955dcea2df9378a45d53d5556a1f726bcf05306.tar.gz
Fix autotests while shadow building with install path
These tests require test plugins which must be installed. However the CI does not run "make install" when shadow building with install path. Subsequently the plugins are not found. We add the plugin path of the shadow build dir to the library path enabling the various plugin loader cases to find the required plugin binaries. Change-Id: I4df21278f3e28db01b3062b27ccc317ccbab3142 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alex <alexander.blasche@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/nokia_services/routing/tst_routing.cpp2
-rw-r--r--tests/auto/positionplugintest/tst_positionplugin.cpp5
-rw-r--r--tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp5
-rw-r--r--tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp5
-rw-r--r--tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp5
-rw-r--r--tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp7
-rw-r--r--tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_realtime_generic/tst_qnmeapositioninfosource_realtime_generic.cpp5
-rw-r--r--tests/auto/qnmeapositioninfosource/qnmeapositioninfosource_simulation_generic/tst_qnmeapositioninfosource_simulation_generic.cpp9
-rw-r--r--tests/auto/qplacemanager/tst_qplacemanager.cpp5
-rw-r--r--tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp6
10 files changed, 52 insertions, 2 deletions
diff --git a/tests/auto/nokia_services/routing/tst_routing.cpp b/tests/auto/nokia_services/routing/tst_routing.cpp
index 6346f081..fdbb8571 100644
--- a/tests/auto/nokia_services/routing/tst_routing.cpp
+++ b/tests/auto/nokia_services/routing/tst_routing.cpp
@@ -227,7 +227,7 @@ tst_nokia_routing::tst_nokia_routing()
void tst_nokia_routing::loadReply(const QString& filename)
{
- QFile* file = new QFile(filename);
+ QFile* file = new QFile(QFINDTESTDATA(filename));
if (!file->open(QIODevice::ReadOnly)) {
delete file;
file = 0;
diff --git a/tests/auto/positionplugintest/tst_positionplugin.cpp b/tests/auto/positionplugintest/tst_positionplugin.cpp
index 502a2b6c..42e9b058 100644
--- a/tests/auto/positionplugintest/tst_positionplugin.cpp
+++ b/tests/auto/positionplugintest/tst_positionplugin.cpp
@@ -65,6 +65,11 @@ private slots:
void tst_PositionPlugin::initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
qRegisterMetaType<QGeoPositionInfo>();
}
diff --git a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
index 49fb8109..7d2230ab 100644
--- a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
+++ b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp
@@ -86,6 +86,11 @@ private:
private slots:
void initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
qRegisterMetaType<QGeoPositionInfo>();
}
diff --git a/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp b/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
index 5960f7ea..0cc9d329 100644
--- a/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
+++ b/tests/auto/qgeocodingmanager/tst_qgeocodingmanager.cpp
@@ -48,6 +48,11 @@ QT_USE_NAMESPACE
void tst_QGeocodingManager::initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
tst_QGeocodingManager::loadGeocodingManager();
}
diff --git a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
index a9b16cd3..83eef77d 100644
--- a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
+++ b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
@@ -122,6 +122,11 @@ TestQGeoPositionInfoSource::TestQGeoPositionInfoSource(QObject *parent)
: QObject(parent)
{
m_testingDefaultSource = false;
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
}
TestQGeoPositionInfoSource *TestQGeoPositionInfoSource::createDefaultSourceTest()
diff --git a/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp b/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
index 2918657b..cfff7bd2 100644
--- a/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
+++ b/tests/auto/qgeoroutingmanager/tst_qgeoroutingmanager.cpp
@@ -48,6 +48,11 @@ QT_USE_NAMESPACE
void tst_QGeoRoutingManager::initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
tst_QGeoRoutingManager::loadRoutingManager();
}
@@ -158,5 +163,5 @@ void tst_QGeoRoutingManager::update()
delete reply;
}
-QTEST_APPLESS_MAIN(tst_QGeoRoutingManager)
+QTEST_MAIN(tst_QGeoRoutingManager)
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 41da1354..24bc7325 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
@@ -51,6 +51,11 @@ public:
tst_QNmeaPositionInfoSource_RealTime_Generic()
{
m_factory = new QNmeaPositionInfoSourceProxyFactory;
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../../plugins"));
}
~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 e7e484e4..4f30a2a2 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
@@ -46,6 +46,15 @@
class tst_QNmeaPositionInfoSource_Simulation_Generic : public TestQGeoPositionInfoSource
{
Q_OBJECT
+public:
+ tst_QNmeaPositionInfoSource_Simulation_Generic()
+ {
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../../plugins"));
+ }
protected:
QGeoPositionInfoSource *createTestSource()
diff --git a/tests/auto/qplacemanager/tst_qplacemanager.cpp b/tests/auto/qplacemanager/tst_qplacemanager.cpp
index 14793974..f3322748 100644
--- a/tests/auto/qplacemanager/tst_qplacemanager.cpp
+++ b/tests/auto/qplacemanager/tst_qplacemanager.cpp
@@ -85,6 +85,11 @@ private:
void tst_QPlaceManager::initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
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 2e65f36b..f1615536 100644
--- a/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp
+++ b/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp
@@ -88,6 +88,12 @@ private:
void tst_QPlaceManagerUnsupported::initTestCase()
{
+ /*
+ * Set custom path since CI doesn't install test plugins
+ */
+ QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()
+ + QStringLiteral("/../../../plugins"));
+
m_provider = 0;
m_manager = 0;