summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-14 08:50:18 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-09-24 11:40:44 -0700
commit60b0b0dedd87ab4f8a842e7f1650d5c96e731c38 (patch)
tree9d29d871fca64e17e36f4b4099a2f4137f9f53f2
parenta5e5943d8a7d2a1345dc94dad0a97cf2966f6e7b (diff)
tst_qplugin{,loader}: make it pass on Macs
Debug builds were broken. WARNING: tst_QPluginLoader::errorString() testdata bin/libtst_qpluginloaderlib.dylib could not be located! $ ls -l bin total 112 -rwxr-xr-x 1 tjmaciei staff 77296 Sep 14 08:46 libtheplugin_debug.dylib -rwxr-xr-x 1 tjmaciei staff 33408 Sep 14 08:46 libtst_qpluginloaderlib_debug.dylib Pick-to: 6.2 Change-Id: I42eb903a916645db9900fffd16a4bb0a51ef967c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index 68edfdf97d..75246d9aaf 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -53,11 +53,11 @@
# define bundle_VALID true
# define dylib_VALID true
# define so_VALID true
-//# ifdef QT_NO_DEBUG
+# ifdef QT_NO_DEBUG
# define SUFFIX ".dylib"
-//# else
-//# define SUFFIX "_debug.dylib"
-//#endif
+# else
+# define SUFFIX "_debug.dylib"
+# endif
# define PREFIX "lib"
#elif defined(Q_OS_HPUX) && !defined(__ia64)
@@ -427,7 +427,7 @@ void tst_QPluginLoader::relativePath()
const QString binDir = QFINDTESTDATA("bin");
QVERIFY(!binDir.isEmpty());
QCoreApplication::addLibraryPath(binDir);
- QPluginLoader loader("theplugin");
+ QPluginLoader loader("theplugin" SUFFIX);
loader.load(); // not recommended, instance() should do the job.
PluginInterface *instance = qobject_cast<PluginInterface*>(loader.instance());
QVERIFY(instance);
@@ -444,7 +444,7 @@ void tst_QPluginLoader::absolutePath()
const QString binDir = QFINDTESTDATA("bin");
QVERIFY(!binDir.isEmpty());
QVERIFY(QDir::isAbsolutePath(binDir));
- QPluginLoader loader(binDir + "/theplugin");
+ QPluginLoader loader(binDir + "/" PREFIX "theplugin" SUFFIX);
loader.load(); // not recommended, instance() should do the job.
PluginInterface *instance = qobject_cast<PluginInterface*>(loader.instance());
QVERIFY(instance);