1import ./make-test-python.nix (
2 { pkgs, ... }:
3 {
4 name = "mindustry";
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.mindustry ];
18 };
19
20 enableOCR = true;
21
22 testScript = ''
23 machine.wait_for_x()
24 machine.execute("mindustry >&2 &")
25 machine.wait_for_window("Mindustry")
26 # Loading can take a while. Avoid wasting cycles on OCR during that time
27 machine.sleep(60)
28 machine.wait_for_text(r"(Play|Database|Editor|Mods|Settings|Quit)")
29 machine.screenshot("screen")
30 '';
31 }
32)