summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2018-06-28 12:31:44 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2018-06-30 19:32:51 +0000
commit6501c04250eb20593a98401177bdaf513a516919 (patch)
treefd8b0a51f73c89ed319cbe476fc7c5bb054a2eb7 /tests
parente75e4b39b78ba05ea2cd45dc96acf99fc89c5915 (diff)
Android: Pass tst_QFactoryLoader
Similar to the changes made for tst_QLibrary: 0ac09c40f28987169786b3063af423e9fe93c6b8 but even less intrusive. Change-Id: I4bc0ba385e639f07f9b39cf8ba9542c27be8a3ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/test.pro8
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp11
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
index 9338f4ecc9..5e4d65a49f 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
@@ -20,3 +20,11 @@ win32 {
!qtConfig(library) {
LIBS += -L ../bin/ -lplugin1 -lplugin2
}
+
+android {
+ libs.prefix = android_test_data
+ libs.base = $$OUT_PWD/..
+ libs.files += $$OUT_PWD/../bin
+
+ RESOURCES += libs
+}
diff --git a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
index 34dc103672..9fa61804b3 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
+++ b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
@@ -42,6 +42,11 @@ Q_IMPORT_PLUGIN(Plugin2)
class tst_QFactoryLoader : public QObject
{
Q_OBJECT
+
+#ifdef Q_OS_ANDROID
+ QSharedPointer<QTemporaryDir> directory;
+#endif
+
public slots:
void initTestCase();
@@ -53,6 +58,12 @@ static const char binFolderC[] = "bin";
void tst_QFactoryLoader::initTestCase()
{
+#ifdef Q_OS_ANDROID
+ directory = QEXTRACTTESTDATA("android_test_data");
+ QVERIFY(directory);
+ QVERIFY(directory->isValid());
+ QVERIFY2(QDir::setCurrent(directory->path()), qPrintable("Could not chdir to " + directory->path()));
+#endif
const QString binFolder = QFINDTESTDATA(binFolderC);
QVERIFY2(!binFolder.isEmpty(), "Unable to locate 'bin' folder");
#if QT_CONFIG(library)