Adds a functional test that starts bitcoin-qt using QT_QPA_PLATFORM=offscreen for headless operation, then verifies it responds to a stop RPC call. This should detect startup crashes in the GUI that have no CI coverage today like https://github.com/bitcoin-core/gui/issues/940
test: add interface_gui.py to test bitcoin-qt startup #35551
pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/guistart changing 6 files +54 −11-
ryanofsky commented at 6:55 PM on June 17, 2026: contributor
-
0d0f797419
test: add interface_gui.py to test bitcoin-gui startup via RPC
Adds a functional test that starts bitcoin-gui (via the bitcoin wrapper with "gui" subcommand) using QT_QPA_PLATFORM=offscreen for headless operation, then verifies it responds to a stop RPC call. This catches startup regressions in the GUI that have no CI coverage today. Extends the test framework to support use_gui=True in TestNode, which invokes "bitcoin gui" instead of "bitcoin node" and automatically sets QT_QPA_PLATFORM=offscreen. Adds BUILD_GUI to test/config.ini.in and is_gui_compiled()/skip_if_no_gui() helpers to BitcoinTestFramework. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DrahtBot added the label Tests on Jun 17, 2026
-
DrahtBot commented at 6:55 PM on June 17, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35551.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers Concept ACK sedited, pablomartin4btc, hebasto If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
sedited commented at 7:01 PM on June 17, 2026: contributor
Concept ACK
-
pablomartin4btc commented at 7:45 PM on June 17, 2026: member
Concept ACK
It seems that the
offscreenplatform plugin isn't available in all CI environments, perhaps adding-feature-offscreentodepends/packages/qt.mkfixes it. - DrahtBot added the label CI failed on Jun 17, 2026
-
in test/functional/interface_gui.py:19 in 0d0f797419
14 | + 15 | + def skip_test_if_missing_module(self): 16 | + self.skip_if_no_gui() 17 | + 18 | + def setup_nodes(self): 19 | + self.extra_init = [{"use_gui": True}]
maflcko commented at 6:05 AM on June 18, 2026:I wonder if this should be a test-level option, similar to
--usecli, so that all tests can be run under the gui (modulo those that ask a question or show a message box with an error or warning)?in test/functional/test_framework/test_node.py:285 in 0d0f797419
280 | @@ -279,6 +281,8 @@ def start(self, extra_args=None, *, cwd=None, stdout=None, stderr=None, env=None 281 | 282 | # add environment variable LIBC_FATAL_STDERR_=1 so that libc errors are written to stderr and not the terminal 283 | subp_env = dict(os.environ, LIBC_FATAL_STDERR_="1") 284 | + if self.use_gui: 285 | + subp_env.setdefault("QT_QPA_PLATFORM", "offscreen")
maflcko commented at 6:08 AM on June 18, 2026:Could also set something like
LC_ALL=nl_NL.UTF-8to check the RPC response is not translated by accident?hebasto commented at 8:23 AM on June 18, 2026: memberConcept ACK.
It seems that the
offscreenplatform plugin isn't available ...--- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -16,6 +16,7 @@ get_target_property(qt_lib_type Qt6::Core TYPE) function(import_plugins target) if(qt_lib_type STREQUAL "STATIC_LIBRARY") set(plugins Qt6::QMinimalIntegrationPlugin) + list(APPEND plugins Qt6::QOffscreenIntegrationPlugin) if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$") list(APPEND plugins Qt6::QXcbIntegrationPlugin) elseif(WIN32) ```
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-20 23:51 UTC
More mirrored repositories can be found on mirror.b10c.me