diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-07-29 02:21:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-07-29 02:23:06 +0900 |
| commit | b43d10468039a07ada412dcab83e8e074ab9ef46 (patch) | |
| tree | 3eca94296dea7e9c364be9e3b29e18c6d33971a2 /test | |
| parent | ddf48a6c22d4387ff2ca2e45afbcc86fa7d81968 (diff) | |
app: integrate interrupt forwarding
This significantly increases usability of command line tools running through hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
| -rw-r--r-- | test/configuration.nix | 15 | ||||
| -rw-r--r-- | test/test.py | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/configuration.nix b/test/configuration.nix index 18aaeda9..58bc19a0 100644 --- a/test/configuration.nix +++ b/test/configuration.nix @@ -127,6 +127,21 @@ }; }; + "cat.gensokyo.extern.foot.noEnablements.immediate" = { + name = "ne-foot-immediate"; + identity = 1; + shareUid = true; + verbose = true; + immediate_termination = true; + share = pkgs.foot; + packages = [ ]; + command = "foot"; + capability = { + dbus = false; + pulse = false; + }; + }; + "cat.gensokyo.extern.foot.pulseaudio" = { name = "pa-foot"; identity = 2; diff --git a/test/test.py b/test/test.py index 9e150399..d0252cfd 100644 --- a/test/test.py +++ b/test/test.py @@ -178,6 +178,16 @@ machine.succeed("pkill -INT -f 'hakurei -v app '") machine.wait_until_fails("pgrep foot", timeout=5) machine.wait_for_file("/tmp/monitor-exit-code") interrupt_exit_code = int(machine.succeed("cat /tmp/monitor-exit-code")) +if interrupt_exit_code != 230: + raise Exception(f"unexpected exit code {interrupt_exit_code}") + +# Check interrupt shim behaviour immediate termination: +swaymsg("exec sh -c 'ne-foot-immediate; echo -n $? > /tmp/monitor-exit-code'") +wait_for_window(f"u0_a{aid(0)}@machine") +machine.succeed("pkill -INT -f 'hakurei -v app '") +machine.wait_until_fails("pgrep foot", timeout=5) +machine.wait_for_file("/tmp/monitor-exit-code") +interrupt_exit_code = int(machine.succeed("cat /tmp/monitor-exit-code")) if interrupt_exit_code != 254: raise Exception(f"unexpected exit code {interrupt_exit_code}") |
