summary refs log tree commit diff
path: root/nixos/tests/vengi-tools.nix
blob: 5bc8d72c7723763f48e60e9c7e575c7613e3e5ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "vengi-tools";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ fgaz ];
  };

  nodes.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("Solid")
      machine.screenshot("screen")
    '';
})