How can I run unit tests for "graphical” programs on a Appveyor macos build

servoz's Avatar

servoz

28 Sep, 2021 10:26 AM

I am trying to use windows, linux and macos Appveyor builds to run unit tests on scripts using PyQt5, with the same appveyor.yml.

  • For windows it works without configuring anything.

  • For linux, it works fine using xfvb:

install:
    - Xvfb&
test_script:
    - xvfb-run python3 test.py -v
  • For macOS I can't find the solution. It seems the macos desktop interface is not based on X11. Since Xvfb implements a virtual X11 display, it can only be used to run X11 applications; none of which are installed by default on macOS.

How can I run unit tests for "graphical” programs on a Appveyor macos build ?

  1. Support Staff 1 Posted by Feodor Fitsner on 28 Sep, 2021 03:35 PM

    Feodor Fitsner's Avatar

    It should be working "as is" on macOS, no?

  2. 2 Posted by servoz on 28 Sep, 2021 04:38 PM

    servoz's Avatar

    I think you are right.
    I think my problem is something else!
    I had other issues to deal with before I looked at this one.
    I'll start investigating..
    However, with macos I see this message:
    Unable to create basic Accelerated OpenGL renderer. Core Image is now using the software OpenGL renderer. This will be slow.
    I think this is just a warning ?
    I'll keep you posted on how it goes. Thanks for your support !

  3. Support Staff 3 Posted by Feodor Fitsner on 28 Sep, 2021 05:14 PM

    Feodor Fitsner's Avatar

    Well, I guess "Accelerated OpenGL renderer" relies on GPU which is not available in VM.

  4. 4 Posted by servoz on 29 Sep, 2021 03:22 PM

    servoz's Avatar

    you are totally right!
    I was able to ssh into the build and there was another problem that had nothing to do with this ticket !!!!
    Indeed, "graphical” programs on a Appveyor macos build works without doing anything.
    The build works perfectly well now.
    Good evening

  5. servoz closed this discussion on 29 Sep, 2021 03:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac