about summary refs log tree commit diff
path: root/nixos/tests/sfxr-qt.nix
blob: 976b9b11fc66aa2186b66f1076e66d53cf1cbb19 (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
30
31
32
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "sfxr-qt";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ fgaz ];
  };

  machine = { config, pkgs, ... }: {
    imports = [
      ./common/x11.nix
    ];

    services.xserver.enable = true;
    sound.enable = true;
    environment.systemPackages = [ pkgs.sfxr-qt ];
  };

  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("sfxr-qt >&2 &")

      machine.wait_for_window(r"sfxr")
      machine.sleep(10)
      machine.wait_for_text("requency")
      machine.screenshot("screen")
    '';
})