depot/third_party/nixpkgs/nixos/tests/ft2-clone.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

33 lines
759 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "ft2-clone";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
nodes.machine = { config, pkgs, ... }: {
imports = [
./common/x11.nix
];
services.xserver.enable = true;
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")
'';
})