diff options
author | Christian Stenger <christian.stenger@digia.com> | 2013-03-01 16:48:07 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@digia.com> | 2013-03-04 15:36:03 +0100 |
commit | 4e6c5396859535456c46cbbb3f4e4e23ee06f2e2 (patch) | |
tree | 62b7c7d0581d9deacc0933852dbf36f961642fb7 | |
parent | 891ab472a4f5bb6541fd9c08a8d65f6c3dad3211 (diff) |
tests: allow execution of test from outside
It shouldn't be necessary to be located inside the pluginspec
folder to execute this test.
Change-Id: I11661760a4d80a4f36980ad6e0077345c56b26e5
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
-rw-r--r-- | tests/auto/extensionsystem/pluginspec/test.pro | 2 | ||||
-rw-r--r-- | tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/extensionsystem/pluginspec/test.pro b/tests/auto/extensionsystem/pluginspec/test.pro index 2f86233cce..5a3c2ca3aa 100644 --- a/tests/auto/extensionsystem/pluginspec/test.pro +++ b/tests/auto/extensionsystem/pluginspec/test.pro @@ -23,6 +23,8 @@ OTHER_FILES += \ include(../../qttest.pri) include(../../../../src/libs/extensionsystem/extensionsystem.pri) +DEFINES += "PLUGINSPEC_DIR=\\\"$$PWD\\\"" + COPYDIR = $$OUT_PWD COPYFILES = $$OTHER_FILES include(../copy.pri) diff --git a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp index e5b24de131..6e6e7216e2 100644 --- a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp +++ b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp @@ -35,6 +35,7 @@ #include <QObject> #include <QMetaObject> #include <QtTest> +#include <QDir> using namespace ExtensionSystem; @@ -54,8 +55,14 @@ private slots: void loadLibrary(); void initializePlugin(); void initializeExtensions(); + void init(); }; +void tst_PluginSpec::init() +{ + QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR))); +} + void tst_PluginSpec::read() { Internal::PluginSpecPrivate spec(0); |