From 324e9f686ec39ba5d4a760d957509c52039cec27 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sun, 21 Nov 2021 18:09:17 +0100 Subject: nixosTests.vengi-tools: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/vengi-tools.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 nixos/tests/vengi-tools.nix (limited to 'nixos') 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") + ''; +}) -- cgit 1.4.1