Files
test/tests/utils
Campbell Barton ee3da7c26c Tests: add wrapper script to launch a graphical headless session
This wrapper script can be used instead of executing "blender"
to launch blender in it's own display server which is closed
when Blender quits.
The BLENDER_BIN environment variable is used to run Blender,
forwarding arguments & passing the exit-code back to the script.

This can be used to run automated graphical-tests while still being
in background (from a user perspective).
This has the advantage that windows don't popup in the foreground,
or on servers/VM's that aren't running a graphical session.
Running many Blender instances, each in their own display server
is also supported, allowing for tests to make use of multiple jobs.

Tested with graphical undo tests which have not yet been made part of
CTests (needs further investigation).

Currently this only supports WAYLAND however it can run on X11
since it launches it's own WAYLAND compositor instance for each
Blender session. The wrapper has been written with the intention of
adding support for other back-ends in the future (if practical).

Use the WESTON compositor since it's widely available and has a
headless server, any other WAYLAND-server could likely be used without
much trouble.
2023-11-04 14:29:38 +11:00
..

Test Utilities
==============

These tests are not intended to run as part of automated unit testing,
rather they can be used to expose issues though stress testing or other less predictable
actions that aren't practical to include in unit tests.

Examples include:

- Loading many blend files from a directory, which can expose issues in file reading.
- Running operators in various contexts which can expose crashes.
- Simulating user input for so ``git bisect`` can be performed on bugs that require user interaction.
- Fuzz testing file importers & file format support.

Note that we could make reduced versions of these tests into unit tests at some point.