nixpkgs/nixos/lib/test-driver
Maximilian Bosch b210d55d48 nixos/lib/test-driver: try using XDG_RUNTIME_DIR if available
At work we have the use-case that several people connect to a large
Linux box to run tests and debug those interactively.

All tests write their state into a global `/tmp` -- e.g. the vde1 socket
and the VMs' state. This leads to conflicts when multiple people are
doing this.

This change tries to use XDG_RUNTIME_DIR before using Python's detection
of a global temp directory: when connecting, this requires a working
user session, but then we get working directories per user. This is
preferable over doing something like `mktemp -d` per run since that
would break use-cases where you want to keep the VMs' state across
multiple sessions (`--keep-vm-state`).

(cherry picked from commit 59b4d0de90)
2025-07-28 09:03:14 +00:00
..
src nixos/lib/test-driver: try using XDG_RUNTIME_DIR if available 2025-07-28 09:03:14 +00:00
default.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
nixos-test-driver-docstrings.nix nixos/test-driver: avoid lib.fileset 2024-12-31 02:30:18 +00:00
shell.nix nixos-test-driver: avoid top-level with in shell.nix 2024-07-29 19:46:18 +02:00