about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2024-02-04 19:59:22 +0100
committerFrancesco Gazzetta <fgaz@fgaz.me>2024-02-04 19:59:22 +0100
commit6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a (patch)
treec25883709388b47c33a64eb60bc98c094e2fb218 /nixos/tests
parent2d3cbf7b8cc80dbaa968f6c5c7f4f7cd40a8a531 (diff)
downloadnixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar.gz
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar.bz2
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar.lz
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar.xz
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.tar.zst
nixlib-6bc390f75b2c3812d2ad6efc753c2f2fd820fd7a.zip
nixosTests.urn-timer: init
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/urn-timer.nix26
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index fbb4573d8135..1411ee192835 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -932,6 +932,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 000000000000..10c5bef49b5b
--- /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")
+    '';
+})