Fix "make check" on systems with qt and libxcb but no active DISPLAY #10117

pull ryanofsky wants to merge 2 commits into bitcoin:master from ryanofsky:pr/noqapp changing 7 files +47 −7
  1. ryanofsky commented at 7:00 PM on March 29, 2017: member

    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.

  2. Add --skip-gui-tests option to bitcoin_test-qt
    Allows partial execution of qt tests on systems that have x11 libraries but
    aren't running an X server or framebuffer.
    916351e321
  3. Run bitcoin_test-qt under xvfb-run, if available
    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 <git@bluematt.me> in
    https://github.com/bitcoin/bitcoin/issues/10110
    
    Fixes #10110
    5bf26c808a
  4. ryanofsky force-pushed on Mar 29, 2017
  5. theuni commented at 1:29 AM on March 30, 2017: member

    @ryanofsky This seems like overkill. How about https://github.com/theuni/bitcoin/commit/b493819ac800c6ba2c34b15ab9a11c8bd2d0c1f2 ?

    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).

  6. ryanofsky commented at 2:21 AM on March 30, 2017: member

    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.

  7. theuni commented at 2:45 AM on March 30, 2017: member

    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.

  8. fanquake added the label Tests on Mar 30, 2017
  9. ryanofsky referenced this in commit bf1026412d on Apr 3, 2017
  10. ryanofsky commented at 3:19 PM on April 3, 2017: member

    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.

  11. ryanofsky closed this on Apr 3, 2017

  12. practicalswift referenced this in commit f44570a166 on Apr 27, 2017
  13. HashUnlimited referenced this in commit 9e1b353b43 on Mar 2, 2018
  14. sickpig referenced this in commit 2600888dc4 on Jan 25, 2019
  15. sickpig referenced this in commit 11e6f050a4 on Feb 10, 2019
  16. sickpig referenced this in commit 2829447df8 on Feb 14, 2019
  17. UdjinM6 referenced this in commit f589aa50aa on Apr 6, 2019
  18. UdjinM6 referenced this in commit 8d4e651015 on Apr 6, 2019
  19. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

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-04-22 00:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me