From 13ba7e119e4eec4bc57c7717db0de947d1bfb3b8 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 11 Sep 2020 11:30:46 +0200 Subject: CMake: Make sure test blacklists are found Some of the qtwayland tests are failing on qemu configs and are thus blacklisted. When the tests were built with CMake, the blacklist file was not found. This is due to the custom QCOMPOSITOR_TEST_MAIN function which does not provide the location of the test source folder, and thus the QTestPrivate::parseBlackList -> QTest::qFindTestData call fails to find black list file. Bring the custom test main function in line with what the other QTest main functions do, which is call QTEST_SET_MAIN_SOURCE_PATH. Note in qmake builds this was not necessary, because the way the source and build folders are computed for tests is slightly different from the CMake way. I don't recall the exact details, but basically CMake builds need this extra information that is set by the QTEST_SET_MAIN_SOURCE_PATH call. Task-number: QTBUG-83968 Change-Id: Ia4742488097a65f18594881c89af48c9d621e6e1 Reviewed-by: Joerg Bornemann --- tests/auto/client/shared/mockcompositor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/client/shared') diff --git a/tests/auto/client/shared/mockcompositor.h b/tests/auto/client/shared/mockcompositor.h index deef1f909..485816178 100644 --- a/tests/auto/client/shared/mockcompositor.h +++ b/tests/auto/client/shared/mockcompositor.h @@ -91,6 +91,7 @@ int main(int argc, char **argv) \ setenv("QT_QPA_PLATFORM", "wayland", 1); \ test tc; \ QGuiApplication app(argc, argv); \ + QTEST_SET_MAIN_SOURCE_PATH \ return QTest::qExec(&tc, argc, argv); \ } \ -- cgit v1.2.3