From 437b2d4a3abdb7ddfbd69d19ca275583bc184258 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 14 Aug 2015 16:02:49 +0100 Subject: [PATCH] Make generatorstest work without installing first --- autotests/generatorstest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autotests/generatorstest.cpp b/autotests/generatorstest.cpp index 22b85fe33..d954e710a 100644 --- a/autotests/generatorstest.cpp +++ b/autotests/generatorstest.cpp @@ -25,6 +25,7 @@ private slots: void GeneratorsTest::testLoadsCorrectly() { + QCoreApplication::setLibraryPaths(QStringList()); QVERIFY2(QDir(GENERATORS_BUILD_DIR).exists(), GENERATORS_BUILD_DIR); // find all possible generators in $CMAKE_BINARY_DIR/generators // We can't simply hardcore the list of generators since some might not be built @@ -37,14 +38,14 @@ void GeneratorsTest::testLoadsCorrectly() if (it.fileName().startsWith(QLatin1String("kio_"))) { continue; // don't check kio_msits.so } - generatorLibs << it.fileName(); + generatorLibs << it.fileInfo().absoluteFilePath(); } } int failures = 0; int successful = 0; foreach (const QString& lib, generatorLibs) { KPluginLoader loader(lib); - QVERIFY(!loader.fileName().isEmpty()); + QVERIFY2(!loader.fileName().isEmpty(), qPrintable(lib)); auto factory = loader.factory(); if (!factory) { qWarning() << "Could not get KPluginFactory for" << lib;