about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/sgt-puzzles.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/sgt-puzzles.nix')
-rw-r--r--nixpkgs/nixos/tests/sgt-puzzles.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/sgt-puzzles.nix b/nixpkgs/nixos/tests/sgt-puzzles.nix
new file mode 100644
index 000000000000..4c5210bfce77
--- /dev/null
+++ b/nixpkgs/nixos/tests/sgt-puzzles.nix
@@ -0,0 +1,34 @@
+import ./make-test-python.nix ({ pkgs, ...} :
+{
+  name = "sgt-puzzles";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ tomfitzhenry ];
+  };
+
+  nodes.machine = { ... }:
+
+  {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+    environment.systemPackages = with pkgs; [
+      sgt-puzzles
+    ];
+  };
+
+  enableOCR = true;
+
+  testScript = { nodes, ... }:
+  ''
+    start_all()
+    machine.wait_for_x()
+
+    machine.execute("mines >&2 &")
+
+    machine.wait_for_window("Mines")
+    machine.wait_for_text("Marked")
+    machine.screenshot("mines")
+  '';
+})