From 03c3c07004eb4eee419432119197e7d759bf6786 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 28 Jan 2019 21:27:22 +0100 Subject: [PATCH] Fix tests on jenkins Qt also has a tga image plugin so unless we make sure ours is used first tests are not testing what they should On a side note their plugin fails our tests so someone with enough time should report the failures to them --- autotests/CMakeLists.txt | 2 +- autotests/readtest.cpp | 1 + autotests/writetest.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 7909f3a..ae28988 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -3,7 +3,7 @@ include(ECMMarkAsTest) include(CMakeParseArguments) -add_definitions(-DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/../src") +add_definitions(-DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/../bin") remove_definitions(-DQT_NO_CAST_FROM_ASCII) macro(kimageformats_read_tests) diff --git a/autotests/readtest.cpp b/autotests/readtest.cpp index ece0e3f..05458e0 100644 --- a/autotests/readtest.cpp +++ b/autotests/readtest.cpp @@ -75,6 +75,7 @@ static bool fuzzyeq(const QImage &im1, const QImage &im2, uchar fuzziness) int main(int argc, char ** argv) { QCoreApplication app(argc, argv); + QCoreApplication::removeLibraryPath(QStringLiteral(PLUGIN_DIR)); QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR)); QCoreApplication::setApplicationName(QStringLiteral("readtest")); QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0")); diff --git a/autotests/writetest.cpp b/autotests/writetest.cpp index 527d99b..0816e1c 100644 --- a/autotests/writetest.cpp +++ b/autotests/writetest.cpp @@ -34,6 +34,7 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); + QCoreApplication::removeLibraryPath(QStringLiteral(PLUGIN_DIR)); QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR)); QCoreApplication::setApplicationName(QStringLiteral("readtest")); QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));