about summary refs log tree commit diff
path: root/nixos/tests/warzone2100.nix
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2022-11-24 20:46:05 +0100
committerFrancesco Gazzetta <fgaz@fgaz.me>2022-11-24 20:48:42 +0100
commitcc0182e2d1796351802f19703be1926fc9e1656f (patch)
treee7cf7d97e43ba3e2a6d427ba0cdd4ca689c79bc0 /nixos/tests/warzone2100.nix
parent533eaa27814ac31d7c049018ccb002b3d6c06653 (diff)
nixosTests.warzone2100: init
Diffstat (limited to 'nixos/tests/warzone2100.nix')
-rw-r--r--nixos/tests/warzone2100.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/tests/warzone2100.nix b/nixos/tests/warzone2100.nix
new file mode 100644
index 0000000000000..568e04a46999d
--- /dev/null
+++ b/nixos/tests/warzone2100.nix
@@ -0,0 +1,26 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "warzone2100";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ fgaz ];
+  };
+
+  nodes.machine = { config, pkgs, ... }: {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+    environment.systemPackages = [ pkgs.warzone2100 ];
+  };
+
+  enableOCR = true;
+
+  testScript =
+    ''
+      machine.wait_for_x()
+      machine.execute("warzone2100 >&2 &")
+      machine.wait_for_window("Warzone 2100")
+      machine.wait_for_text(r"(Single Player|Multi Player|Tutorial|Options|Quit Game)")
+      machine.screenshot("screen")
+    '';
+})