summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2020-10-12 11:06:04 +0200
committerGitHub <noreply@github.com>2020-10-12 11:06:04 +0200
commit787ec1544074f8c2709c2cfe523fae34d3be6942 (patch)
tree2bfffee50a15f29d6d0be184274fd71849436867 /nixos
parent38c6398c7842335f769cfbe4f71a070484f9432b (diff)
parent75414df39ebb69865aa7d700be827d296e468d6d (diff)
downloadnixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar.gz
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar.bz2
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar.lz
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar.xz
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.tar.zst
nixpkgs-787ec1544074f8c2709c2cfe523fae34d3be6942.zip
Merge pull request #94187 from fgaz/ft2-clone/1.27
ft2-clone: add a test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/ft2-clone.nix35
2 files changed, 36 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 5512a63e346..6564a958d5b 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -113,6 +113,7 @@ in
   fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {};
   freeswitch = handleTest ./freeswitch.nix {};
   fsck = handleTest ./fsck.nix {};
+  ft2-clone = handleTest ./ft2-clone.nix {};
   gerrit = handleTest ./gerrit.nix {};
   gotify-server = handleTest ./gotify-server.nix {};
   grocy = handleTest ./grocy.nix {};
diff --git a/nixos/tests/ft2-clone.nix b/nixos/tests/ft2-clone.nix
new file mode 100644
index 00000000000..c877054234e
--- /dev/null
+++ b/nixos/tests/ft2-clone.nix
@@ -0,0 +1,35 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "ft2-clone";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ fgaz ];
+  };
+
+  machine = { config, pkgs, ... }: {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+    sound.enable = true;
+    environment.systemPackages = [ pkgs.ft2-clone ];
+  };
+
+  enableOCR = true;
+
+  testScript =
+    ''
+      machine.wait_for_x()
+      # Add a dummy sound card, or the program won't start
+      machine.execute("modprobe snd-dummy")
+
+      machine.execute("ft2-clone &")
+
+      machine.wait_for_window(r"Fasttracker")
+      machine.sleep(5)
+      # One of the few words that actually get recognized
+      if "Songlen" not in machine.get_screen_text():
+          raise Exception("Program did not start successfully")
+      machine.screenshot("screen")
+    '';
+})
+