diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-14 16:45:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-14 16:45:17 +0900 |
| commit | 1cdc6b4246ac82adb0c9ed7620d3f7225f1a3e7f (patch) | |
| tree | c428d3123d5d272122338023d9e7d7067bdb693f /test/sandbox | |
| parent | 56aad8dc112f45ec26df72bdbbd959c5e8db5bec (diff) | |
test/sandbox: create marker in /var/tmp
This prepares the test suite for private TMPDIR.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/sandbox')
| -rw-r--r-- | test/sandbox/case/default.nix | 4 | ||||
| -rw-r--r-- | test/sandbox/configuration.nix | 1 | ||||
| -rw-r--r-- | test/sandbox/test.py | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/test/sandbox/case/default.nix b/test/sandbox/case/default.nix index 96a12a60..b6ce3a2a 100644 --- a/test/sandbox/case/default.nix +++ b/test/sandbox/case/default.nix @@ -58,7 +58,9 @@ let packages = [ ]; path = "${testProgram}/bin/hakurei-test"; args = [ - "test" + "hakurei-test" + "-p" + "/var/tmp/.hakurei-check-ok.${toString identity}" "-t" (toString (builtins.toFile "hakurei-${tc.name}-want.json" (builtins.toJSON tc.want))) "-s" diff --git a/test/sandbox/configuration.nix b/test/sandbox/configuration.nix index 84065531..cf2df03d 100644 --- a/test/sandbox/configuration.nix +++ b/test/sandbox/configuration.nix @@ -31,6 +31,7 @@ in # For checking pd outcome: (pkgs.writeShellScriptBin "check-sandbox-pd" '' hakurei -v run hakurei-test \ + -p "/var/tmp/.hakurei-check-ok.0" \ -t ${toString (builtins.toFile "hakurei-pd-want.json" (builtins.toJSON testCases.pd.want))} \ -s ${testCases.pd.expectedFilter.${pkgs.system}} "$@" '') diff --git a/test/sandbox/test.py b/test/sandbox/test.py index 5997b890..b1b63398 100644 --- a/test/sandbox/test.py +++ b/test/sandbox/test.py @@ -60,7 +60,7 @@ check_offset = 0 def check_sandbox(name): global check_offset swaymsg(f"exec script /dev/null -E always -qec check-sandbox-{name}") - machine.wait_for_file(f"/tmp/hakurei.0/tmpdir/{check_offset}/sandbox-ok", timeout=15) + machine.wait_for_file(f"/var/tmp/.hakurei-check-ok.{check_offset}", timeout=15) check_filter(check_offset, name, "hakurei-test") check_offset += 1 |
