Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.0 Beta1
-
None
Description
agent:2021/07/19 10:42:24 build.go:391: 237: Running test command: "/Users/qt/work/qt/qtbase_standalone_tests/tests/auto/cmake/in_source/test_QT_TESTCASE_BUILDDIR/build/test_qt_testcase_builddir" agent:2021/07/19 10:42:24 build.go:391: 237: Test command failed: /Users/qt/work/qt/qtbase_standalone_tests/tests/auto/cmake/in_source/test_QT_TESTCASE_BUILDDIR/build/test_qt_testcase_builddir agent:2021/07/19 10:42:24 build.go:391: 237: ********* Start testing of TestClass ********* agent:2021/07/19 10:42:24 build.go:391: 237: Config: Using QtTest library 6.2.0, Qt 6.2.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 12.0.0 (clang-1200.0.32.29) (Apple)), macos 11.0 agent:2021/07/19 10:42:24 build.go:391: 237: PASS : TestClass::initTestCase() agent:2021/07/19 10:42:24 build.go:391: 237: WARNING: TestClass::doTest() testdata level2/testdata_build.txt could not be located! agent:2021/07/19 10:42:24 build.go:391: 237: Loc: [/Users/qt/work/qt/qtbase_standalone_tests/tests/auto/cmake/in_source/test_QT_TESTCASE_BUILDDIR/main.cpp(50)] agent:2021/07/19 10:42:24 build.go:391: 237: QWARN : TestClass::doTest() QFSFileEngine::open: No file name specified agent:2021/07/19 10:42:24 build.go:391: 237: FAIL! : TestClass::doTest() 'fbuild.open(QFile::ReadOnly)' returned FALSE. () agent:2021/07/19 10:42:24 build.go:391: 237: Loc: [/Users/qt/work/qt/qtbase_standalone_tests/tests/auto/cmake/in_source/test_QT_TESTCASE_BUILDDIR/main.cpp(51)] agent:2021/07/19 10:42:24 build.go:391: 237: PASS : TestClass::cleanupTestCase() agent:2021/07/19 10:42:24 build.go:391: 237: Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 1ms agent:2021/07/19 10:42:24 build.go:391: 237: ********* Finished testing of TestClass *********
Precheck done using https://codereview.qt-project.org/c/qt/qtbase/+/360455 + https://codereview.qt-project.org/c/qt/qt5/+/360035
Issue seems to be related to a CMake 3.21.0 behavior change when using Ninja.
https://gitlab.kitware.com/cmake/cmake/-/issues/13894
Ninja will now pass absolute paths to the compiler when compiling the cpp source file. i.e.
# worked -c ../main.cpp # doesn't work -c /Users/qt/work/qt/st_cmake/tests/auto/cmake/in_source/test_QT_TESTCASE_BUILDDIR/main.cpp
This causes the test's QFINDTESTDATA not to find the testdata despite having an explicit QT_TESTCASE_BUILDDIR and QT_TESTCASE_SOURCEDIR being passed when compiling the test sources.
Test worked fine when built in-source with CMake 3.20.
Related issues and changes:
QTBUG-82820
https://gitlab.kitware.com/cmake/cmake/-/issues/13894
https://codereview.qt-project.org/c/qt/qtbase/+/263785
https://codereview.qt-project.org/c/qt/qtbase/+/293480
https://codereview.qt-project.org/c/qt/qtbase/+/340549
Attachments
Issue Links
- relates to
-
QTBUG-95018 Change the minimum required CMake version for building and using Qt
- Closed
-
QTBUG-82820 Insource builds and relative paths with Ninja generator
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-95268 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
360679,5 | CMake: Disable test_QT_TESTCASE_BUILDDIR cmake build test | dev | qt/qtbase | Status: MERGED | +2 | 0 |
361393,2 | CMake: Disable test_QT_TESTCASE_BUILDDIR cmake build test | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |