diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-05 01:57:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 01:57:20 +0100 |
commit | 1f4b41071c33f9811713175b02f6e39312b7b811 (patch) | |
tree | 8c94c298e2a61512ea552ea85ba663749a5fc99e /nixos/tests | |
parent | 86a5d2482eecde9579c2f073e04a14e170ef5e31 (diff) | |
parent | 6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a (diff) |
Merge pull request #286343 from fgaz/urn-timer/nixos-test
nixosTests.urn-timer: init
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/urn-timer.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 66c29092cb6d0..c2114098fe059 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -934,6 +934,7 @@ in { upnp.nftables = handleTest ./upnp.nix { useNftables = true; }; uptermd = handleTest ./uptermd.nix {}; uptime-kuma = handleTest ./uptime-kuma.nix {}; + urn-timer = handleTest ./urn-timer.nix {}; usbguard = handleTest ./usbguard.nix {}; user-activation-scripts = handleTest ./user-activation-scripts.nix {}; user-expiry = runTest ./user-expiry.nix; diff --git a/nixos/tests/urn-timer.nix b/nixos/tests/urn-timer.nix new file mode 100644 index 0000000000000..10c5bef49b5b3 --- /dev/null +++ b/nixos/tests/urn-timer.nix @@ -0,0 +1,26 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "urn-timer"; + meta = with pkgs.lib.maintainers; { + maintainers = [ fgaz ]; + }; + + nodes.machine = { config, pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + environment.systemPackages = [ pkgs.urn-timer ]; + }; + + enableOCR = true; + + testScript = + '' + machine.wait_for_x() + machine.execute("urn-gtk ${pkgs.urn-timer.src}/splits_examples/sotn.json >&2 &") + machine.wait_for_window("urn") + machine.wait_for_text(r"(Mist|Bat|Reverse|Dracula)") + machine.screenshot("screen") + ''; +}) |