diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/daemon.py | 3 | ||||
| -rw-r--r-- | test/process.zig | 4 | ||||
| -rw-r--r-- | test/soak.py | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/test/daemon.py b/test/daemon.py index 074c860c..33806575 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -1723,6 +1723,9 @@ def gui_upgrades(old, new): if __name__ == '__main__': + # A session's state file is its HOME's, never the user's: the dumps a + # test makes there would push the user's out. + os.environ.pop('XDG_DATA_HOME', None) if sys.argv[1:3] == ['--upgrade', '--gui']: gui_upgrades(Path(sys.argv[3]).resolve(), Path(sys.argv[4]).resolve()) elif sys.argv[1:2] == ['--upgrade']: diff --git a/test/process.zig b/test/process.zig index a3679dfd..674996d0 100644 --- a/test/process.zig +++ b/test/process.zig @@ -903,6 +903,10 @@ pub const Child = struct { if (root_z) |r| for ([_][2][*:0]const u8{ .{ "HOME", r }, .{ "XDG_RUNTIME_DIR", r }, .{ "XDG_CONFIG_HOME", config }, .{ "PARDES_NOTIME", "1" }, }) |kv| if (setenv(kv[0], kv[1], 1) != 0) _exit(126); + // A test session's state file is its HOME's (.local/share/pardes), + // never the user's: the dumps a test makes there would push the + // user's out. + if (root_z != null) _ = unsetenv("XDG_DATA_HOME"); for ([_][2][*:0]const u8{ .{ "PARDES_DAEMON", "off" }, .{ "PARDES_LSP_RS", "" }, .{ "PARDES_LSP_C", "" }, .{ "PARDES_LSP_GO", "" }, .{ "PARDES_LSP_TS", "" }, .{ "PARDES_LSP_PY", "" }, diff --git a/test/soak.py b/test/soak.py index 99f43cc9..d99f862c 100644 --- a/test/soak.py +++ b/test/soak.py @@ -1759,6 +1759,9 @@ def instant(args): def main(): + # A session's state file is its HOME's, never the user's: the dumps a + # test makes there would push the user's out. + os.environ.pop('XDG_DATA_HOME', None) ap = argparse.ArgumentParser(description=__doc__.split('\n\n')[0]) ap.add_argument('where', choices=['local', 'box', 'instant']) ap.add_argument('--box', action='store_true', help='instant: the session on the box (else local, at each --rtts)') |
