From 60b0b0dedd87ab4f8a842e7f1650d5c96e731c38 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 14 Sep 2021 08:50:18 -0700 Subject: tst_qplugin{,loader}: make it pass on Macs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- .../auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto') 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(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(loader.instance()); QVERIFY(instance); -- cgit v1.2.3