summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2021-11-21 18:09:17 +0100
committerFrancesco Gazzetta <fgaz@fgaz.me>2021-11-23 15:23:52 +0100
commit324e9f686ec39ba5d4a760d957509c52039cec27 (patch)
tree043b1cab3421ac61e91b78ee3dabf1c62fff5841 /nixos/tests
parent218f14351463ed26809479410600f2ef136d05b4 (diff)
downloadnixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar.gz
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar.bz2
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar.lz
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar.xz
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.tar.zst
nixpkgs-324e9f686ec39ba5d4a760d957509c52039cec27.zip
nixosTests.vengi-tools: init
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/vengi-tools.nix29
2 files changed, 30 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index b8219416dc4..ab107dfdcff 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -486,6 +486,7 @@ in
   vault-postgresql = handleTest ./vault-postgresql.nix {};
   vaultwarden = handleTest ./vaultwarden.nix {};
   vector = handleTest ./vector.nix {};
+  vengi-tools = handleTest ./vengi-tools.nix {};
   victoriametrics = handleTest ./victoriametrics.nix {};
   vikunja = handleTest ./vikunja.nix {};
   virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
diff --git a/nixos/tests/vengi-tools.nix b/nixos/tests/vengi-tools.nix
new file mode 100644
index 00000000000..6b90542887d
--- /dev/null
+++ b/nixos/tests/vengi-tools.nix
@@ -0,0 +1,29 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "vengi-tools";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ fgaz ];
+  };
+
+  machine = { config, pkgs, ... }: {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+    environment.systemPackages = [ pkgs.vengi-tools ];
+  };
+
+  enableOCR = true;
+
+  testScript =
+    ''
+      machine.wait_for_x()
+      machine.execute("vengi-voxedit >&2 &")
+      machine.wait_for_window("voxedit")
+      # OCR on voxedit's window is very expensive, so we avoid wasting a try
+      # by letting the window load fully first
+      machine.sleep(15)
+      machine.wait_for_text("Palette")
+      machine.screenshot("screen")
+    '';
+})