summaryrefslogtreecommitdiffstats
path: root/nixos/tests/sdl3.nix
blob: 33c9133216325fb56761c077ca4e382f362ddf7f (plain)
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
{ pkgs, ... }:
{
  name = "sdl3";
  meta.maintainers = pkgs.sdl3.meta.maintainers;

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

      environment.systemPackages = [ pkgs.sdl3.passthru.debug-text-example ];
    };

  enableOCR = true;

  testScript = ''
    machine.wait_for_x()

    machine.execute("debug-text >&2 &")

    machine.wait_for_window("examples/renderer/debug-text")
    machine.wait_for_text("Hello world")

    machine.screenshot("screen")
  '';
}