1import ./make-test-python.nix (
2 { pkgs, ... }:
3 {
4 name = "domination";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ fgaz ];
7 };
8
9 nodes.machine =
10 { config, pkgs, ... }:
11 {
12 imports = [
13 ./common/x11.nix
14 ];
15
16 services.xserver.enable = true;
17 environment.systemPackages = [ pkgs.domination ];
18 };
19
20 enableOCR = true;
21
22 testScript = ''
23 machine.wait_for_x()
24 # Add a dummy sound card, or an error reporting popup will appear,
25 # covering the main window and preventing OCR
26 machine.execute("modprobe snd-dummy")
27 machine.execute("domination >&2 &")
28 machine.wait_for_window("Menu")
29 machine.wait_for_text(r"(New Game|Start Server|Load Game|Help Manual|Join Game|About|Play Online)")
30 machine.screenshot("screen")
31 '';
32 }
33)