Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[CI] Investigate graphics unit testing under macOS #21

@Razakhel

Description

@Razakhel

After having tried many different things, launching unit tests which require graphics capabilities (using GLFW in this case) always fail. It is yet unknown if this is due to:

  • A technical issue of macOS VMs/servers without any available workaround (which doesn't seem like it, since there are reports that it can be done, at least could have been some time ago);
  • Something missing concerning the window's initialization: GLFW may need specific settings to be able to start under those conditions;
  • Specific arguments to launch Xvfb and/or the tests executable with.

See:

Note: Xvfb needs the package xquartz to be installed by brew.

Separate steps

- name: Starting Xvfb
  run: |
    export DISPLAY=:99.0;
    ( sudo /usr/X11/bin/Xvfb :99 -ac -screen 0 1280x720x24 +render +iglx )&

- name: Test
  working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
  run: ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/62d6113c-982d-45c8-abf4-0294b9601198.sh: line 1:  2157 Abort trap: 6           ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.

See:

Single command

- name: Test
  working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
  run: /usr/X11/bin/Xvfb :99 & export DISPLAY=:99 & ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 2
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/1e2bfa6e-3279-423e-aa75-96161a9cb859.sh: line 1:  2149 Abort trap: 6           ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.

See:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help wantedIdeaTo be considered; may need testing and/or timemacOSIssues related to macOS

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions