about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/ft2-clone.nix
blob: 5476b38c00bd26d3f4ad15a1e8cdfab87cf00e44 (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
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "ft2-clone";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ fgaz ];
  };

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

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

      machine.wait_for_window(r"Fasttracker")
      machine.sleep(5)
      machine.wait_for_text(r"(Songlen|Repstart|Time|About|Nibbles|Help)")
      machine.screenshot("screen")
    '';
})