X Server Management (functional_harness/x_server.py
)¶
Wrapper for easily setting up and tearing down a test X server
- x_server(argv, screens)[source]¶
Context manager to launch and then clean up an X server.
- Parameters:
- Raises:
subprocess.CalledProcessError – The X server or xauth failed unexpectedly.
FileNotFoundError – Could not find either the xauth command or
argv[0]
.PermissionError – Somehow, we lack write permission inside a directory created by
tempfile.mkdtemp()
.ValueError –
argv[0]
was not an X server binary we know how to specify monitor rectangles for. (either Xvfb or Xephyr)UnicodeDecodeError – The X server’s
-displayfd
option wrote a value to the given FD which could not be decoded as UTF-8 when it should have been part of the 7-bit ASCII subset of UTF-8.
- Return type: