From d654ff4e9907d7fe2e67422cfa777aa8ea28302c Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 19 Jul 2021 16:02:51 +0200 Subject: [PATCH] CMake: Disable test_QT_TESTCASE_BUILDDIR cmake build test CMake 3.21.0 + Ninja now pass absolute source file paths to the compiler which causes __FILE__ to be absolute and qFindTestData to ignore any QT_TESTCASE_BUILDDIR value. This causes the test to fail, because it won't find test data in the custom specified location. Disable the test for now. Amends 70464b355ec1c7007e0b1291f733e2540ba1825f Pick-to: 6.2 Task-number: QTBUG-95268 Task-number: QTBUG-95018 Change-Id: If99035e897ac1d5f153d4e19c94e4355f88970af Reviewed-by: Cristian Adam Reviewed-by: Qt CI Bot Reviewed-by: Alexey Edelev --- tests/auto/cmake/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index c2ab33c96b..cfbf7bafe6 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -125,10 +125,14 @@ if (CMAKE_GENERATOR STREQUAL Ninja AND UNIX AND NOT WIN32) BINARY "tests/test_QFINDTESTDATA" SIMULATE_IN_SOURCE ) - _qt_internal_test_expect_pass(test_QT_TESTCASE_BUILDDIR - BINARY "test_qt_testcase_builddir" - SIMULATE_IN_SOURCE - ) + # TODO: Decide if there's a reason to keep this test. With CMake 3.21.0 which passes absolute + # source file paths to the compiler (instead of relative ones), specifying a custom + # QT_TESTCASE_BUILDDIR is a no-op, which fails the test's preconditions. + # See QTBUG-95268. + #_qt_internal_test_expect_pass(test_QT_TESTCASE_BUILDDIR + # BINARY "test_qt_testcase_builddir" + # SIMULATE_IN_SOURCE + #) endif() if (NOT NO_DBUS)