Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Nov 12, 2025

This PR simplifies testing on Windows by removing the need to set the QT_PLUGIN_PATH environment variable for different build configurations. For example, the paths might otherwise be:

  • C:/Users/hebasto/dev/bitcoin/build/vcpkg_installed/x64-windows/Qt6/plugins/ for "Release"
  • C:/Users/hebasto/dev/bitcoin/build/vcpkg_installed/x64-windows/debug/Qt6/plugins/ for "Debug"

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 12, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33865.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@hebasto
Copy link
Member Author

hebasto commented Nov 12, 2025

Friendly ping @purpleKarrot :)

# the "minimal" platform plugin unusable due to internal Qt bugs.
set_tests_properties(test_bitcoin-qt PROPERTIES
ENVIRONMENT "QT_QPA_PLATFORM=windows"
set(plugin_path "$<SHELL_PATH:$<PATH:GET_PARENT_PATH,$<PATH:GET_PARENT_PATH,$<TARGET_PROPERTY:Qt6::QWindowsIntegrationPlugin,LOCATION_$<CONFIG>>>>>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the _$<CONFIG> part is unnecessary, because the value of the LOCATION property is already config dependent.

$<PATH:GET_*,...> requires CMake version 3.24.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the _$<CONFIG> part is unnecessary, because the value of the LOCATION property is already config dependent.

Are you sure about that? I tested your suggestion, and it returns the path to the “Release” plugin when building with --config Debug.

$<PATH:GET_*,...> requires CMake version 3.24.

I think it's safe, as the version of CMake shipped with Visual Studio was updated to 3.24.1 starting from version 17.4. The current minimum required Visual Studio version is 17.13. And this code is reachable only on Windows with vcpkg.

@Sammie05
Copy link

Tested on Windows and the Qt test runs successfully without requiring manual QT_PLUGIN_PATH environment setup.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants