summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-09-11 11:30:46 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-09-15 16:10:24 +0200
commit13ba7e119e4eec4bc57c7717db0de947d1bfb3b8 (patch)
treee45b42c00215c6a13f2b5d28d413a91e2e485ba5 /tests/auto/client/shared
parent488ce1ce371921c891423f54557f66aacd00fb0f (diff)
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/client/shared')
-rw-r--r--tests/auto/client/shared/mockcompositor.h1
1 files changed, 1 insertions, 0 deletions
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); \
} \