Skip to content

Conversation

@ryanofsky
Copy link
Contributor

Issue reported by @TheBlueMatt in #10110

This is an alternative to the fix in #10113. Instead of modifying test_bitcoin-qt to try to detect whether it's possible to run GUI tests with a check that is probably not reliable, it just adds a --skip-gui-tests option that can be controlled externally. Then, it uses autoconf checks to see if passing the option is necessary.

Allows partial execution of qt tests on systems that have x11 libraries but
aren't running an X server or framebuffer.
If xvfb-run is not available, run an autoconf check to determine if
instantiating a QApplication is possible, and if not, run the test with
--skip-gui-tests.

Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin#10110

Fixes bitcoin#10110
@theuni
Copy link
Member

theuni commented Mar 30, 2017

@ryanofsky This seems like overkill. How about theuni@b493819 ?

Afaik, the minimal platform is available everywhere, and seems to be enough to make this work.

(this needs a bit of extra configure logic though, so that we don't disable all of qt in the rare event that qminimal is missing).

@ryanofsky
Copy link
Contributor Author

Interesting, I didn't know about the minimal platform. If you like, I can use your change as a starting point and try to add the needed configuration logic. I'd also like to keep optional support for the regular platforms, because it can be useful to show or interact with widgets while debugging the test.

@theuni
Copy link
Member

theuni commented Mar 30, 2017

Sure. You can just make it minimal by default, and overridable to something else.

Fwiw, you can use either "-platform minimal" or use the QT_QPA_PLATFORM env. The env was easier for a poc, but maybe you'll want to set the platform arg if there's not one set already.

@fanquake fanquake added the Tests label Mar 30, 2017
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 3, 2017
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin#10110

Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
bitcoin#10117 (comment)
@ryanofsky
Copy link
Contributor Author

Closing this in favor of #10142.

this needs a bit of extra configure logic though, so that we don't disable all of qt in the rare event that qminimal is missing

It seems easier to just require the minimal platform, unless there are cases where you think this isn't a reasonable requirement. Adding extra configure logic to make the check for -lqminimal nonfatal in a static Qt build isn't enough to know whether the setenv(QT_QPA_PLATFORM) call will be safe, so the test could still fail without more runtime code, which seems not worth writing.

@ryanofsky ryanofsky closed this Apr 3, 2017
HashUnlimited pushed a commit to chaincoin/chaincoin that referenced this pull request Mar 2, 2018
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin#10110

Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
bitcoin#10117 (comment)

Conflicts:
	src/qt/test/test_main.cpp
sickpig pushed a commit to sickpig/BitcoinUnlimited that referenced this pull request Jan 25, 2019
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin/bitcoin#10110

Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
bitcoin/bitcoin#10117 (comment)
sickpig pushed a commit to sickpig/BitcoinUnlimited that referenced this pull request Feb 10, 2019
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin/bitcoin#10110

Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
bitcoin/bitcoin#10117 (comment)
sickpig pushed a commit to sickpig/BitcoinUnlimited that referenced this pull request Feb 14, 2019
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
bitcoin/bitcoin#10110

Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
bitcoin/bitcoin#10117 (comment)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants