summary refs log tree commit diff
path: root/nixos/tests/domination.nix
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2021-11-13 23:00:20 +0100
committerFrancesco Gazzetta <fgaz@fgaz.me>2021-11-13 23:00:20 +0100
commitdf99f2326ee60ea5e44ecea403f92d98313e1a1f (patch)
treee93543275cb9e60c6951dec7938ce266278e575e /nixos/tests/domination.nix
parentdf177cf39b6d9e1a10967079cb32970401d91a25 (diff)
downloadnixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar.gz
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar.bz2
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar.lz
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar.xz
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.tar.zst
nixpkgs-df99f2326ee60ea5e44ecea403f92d98313e1a1f.zip
nixosTests.domination: init
Diffstat (limited to 'nixos/tests/domination.nix')
-rw-r--r--nixos/tests/domination.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/tests/domination.nix b/nixos/tests/domination.nix
new file mode 100644
index 00000000000..c76d4ed8c61
--- /dev/null
+++ b/nixos/tests/domination.nix
@@ -0,0 +1,26 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "domination";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ fgaz ];
+  };
+
+  machine = { config, pkgs, ... }: {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+    environment.systemPackages = [ pkgs.domination ];
+  };
+
+  enableOCR = true;
+
+  testScript =
+    ''
+      machine.wait_for_x()
+      machine.execute("domination >&2 &")
+      machine.wait_for_window("Menu")
+      machine.wait_for_text("New Game")
+      machine.screenshot("screen")
+    '';
+})