Commit 437b2d4a authored by Alex Richardson's avatar Alex Richardson
Browse files

Make generatorstest work without installing first

parent bb22f7d3
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment