cmake: Build test_bitcoin-qt executable#101
Conversation
3c071c2 to
197fcce
Compare
197fcce to
a0ca82e
Compare
theuni
left a comment
There was a problem hiding this comment.
I noticed while poking around that cmake adds:
CMakeFiles/test_bitcoin-qt.dir/__/__/__/depends/x86_64-pc-linux-gnu/lib/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin_Import.cpp.o
The contents of Qt5Gui_QXcbIntegrationPlugin_Import.cpp are:
#include <QtPlugin>
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)So I think we're doing that twice?
It seems we should either turn that off somehow, or remove the import from our code?
| - name: Test Release configuration | ||
| run: | | ||
| ctest --test-dir build -j $env:NUMBER_OF_PROCESSORS -C Release | ||
| ctest --test-dir build -j $env:NUMBER_OF_PROCESSORS -C Release --exclude-regex test_bitcoin-qt |
There was a problem hiding this comment.
Why? Because it requires a gui? Could you please add a comment?
There was a problem hiding this comment.
A "TODO" comment with links to the issues has been added.
ba5caff to
67ea3ab
Compare
Nice catch! It happens on the staging branch as well. Investigating... |
67ea3ab to
fcff961
Compare
Thank you for this insight! Please consider #103. This PR has been rebased on #103 and drafted for now. |
fcff961 to
31bbd21
Compare
|
On Windows, the statically linked Specifically, This behavior differs from our custom static Qt build in the master branch, which does not crash :) I believe that the root of the difference in behaviour lies in the following Qt configuration options:
There are two obvious workarounds for this unfortunate issue:
Thought? cc @sipsorcery |
|
+1 to disable the tests for the dynamically linked version. Reasoning being that the Windows build is for "developers only" and tracking down Qt bugs for a non-production build doesn't seem to offer a good effort to reward tradeoff. |
pablomartin4btc
left a comment
There was a problem hiding this comment.
tACK cb1a44f
Tested on Ubuntu 22.04.
...
Tests:
test_bitcoin ........................ ON
test_bitcoin-qt ..................... ON
...
./build/src/qt/test/test_bitcoin-qt
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
********* Start testing of AppTests *********
Config: Using QtTest library 5.15.3, Qt 5.15.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 11.3.0), ubuntu 22.04
...
All tests passed.
~InitExecutor : Stopping thread
~InitExecutor : Stopped thread
The mentioned issues have been fixed in bitcoin-core/gui#803. Please review it as well :) |
Find out whether Qt is static explicitly as it's done in the master branch.
|
Reworked. Rebased. Ready for review. The PR description has been updated with Windows/MSVC specific notes. Friendly ping @TheCharlatan @m3dwards @pablomartin4btc @vasild; and @sipsorcery (as a Windows expert) :) |
|
With a dynamic linked build on Windows I get: |
Yes. That happens when a user has no privilege to create symbolic links. This issue is not specific to this PR change. However, it should be fixed. |
|
tACK 4da7634. |
pablomartin4btc
left a comment
There was a problem hiding this comment.
re tACK e4b4c98
On Ubuntu 22.04.
./build/src/qt/test/test_bitcoin-qt
...
All tests passed.
...
ctest -j $(nproc)
...
100% tests passed, 0 tests failed out of 128
Total Test time (real) = 22.90 sec
pablomartin4btc
left a comment
There was a problem hiding this comment.
re tACK e4b4c98
Tested cross-building for Windows on WSL Ubuntu 22.04.
All tests passed. (running test_bitcoin-qt.exe successfully in both WSL and Windows 11 Pro)
593b130 cmake: Add `libqrencode` optional package support (Hennadii Stepanov) Pull request description: A new configuration option `WITH_QRENCODE` has been added. This PR, along with #101, concludes the GUI-specific part of the new CMake-based build system. ACKs for top commit: pablomartin4btc: tACK 593b130 Tree-SHA512: ba21d65ccff59e29585bd6ce092216034abcbd9866e5452fe6a1b1e2f0957dc3c48a204c170ce443888852ae165be7cb1846483b031b8cf49e6d986dec722f88
A new configuration option is
BUILD_GUI_TESTS.Native Windows / MSVC Notes:
-opengl dynamic, which makes the "minimal" platform plugin unusable due to internal Qt bugs.ctestworkarounds this issue by setting the environment variableQT_QPA_PLATFORM=windows.x64-windowsandx64-windows-statictriplets. Please note thattest_bitcoin-qt.exefails to run in the CI environment on the master branch.test_bitcoin-qt.exedirectly (not driven byctest).