docs: update testing instructions

Updates the testing instructions with instructions
for running safely, without affecting the user's
running session.
This commit is contained in:
Kristen McWilliam 2024-07-09 16:04:18 -04:00
parent 9240d75e51
commit 6d7a9a6416

View file

@ -18,14 +18,29 @@ emulation. This gives the tests a stable base removing variance introduced by di
Users of non-Mesa drivers (e.g. proprietary NVIDIA driver) need to ensure that Mesa is also installed. If your system Users of non-Mesa drivers (e.g. proprietary NVIDIA driver) need to ensure that Mesa is also installed. If your system
uses libglvnd this should work out of the box, if not you might need to tune LD_LIBRARY_PATH. uses libglvnd this should work out of the box, if not you might need to tune LD_LIBRARY_PATH.
# Running the test suite # Preventing side effects
To prevent side effects with the running session it is recommended to run tests
in a dedicated dbus session. This can be achieved by prefixing the test command
with `dbus-run-session`, as shown in the examples below.
# Running tests
Tests are more likely to succeed when run from ssh, as the environment is
further isolated from the user's session. For example:
```bash
ssh localhost
```
Then, run the tests as described below.
## Running the test suite
The test suite can be run from the build directory. Best is to do: The test suite can be run from the build directory. Best is to do:
cd path/to/build/directory cd path/to/build/directory
xvfb-run ctest dbus-run-session xvfb-run ctest
# Running individual tests ## Running individual tests
All tests executables are created in the directory "bin" in the build directory. Each test can be executed by just starting it from within the test directory. To prevent side effects with the running session it is recommended to start a dedicated dbus session: All tests executables are created in the directory "bin" in the build directory. Each test can be executed by just starting it from within the test directory:
cd path/to/build/directory/bin cd path/to/build/directory/bin
dbus-run-session ./testFoo dbus-run-session ./testFoo