1 import ./make-test-python.nix ({ pkgs, ... }:
5 meta = with pkgs.lib; { maintainers = teams.libretro.members ++ [ maintainers.j0hax ]; };
7 nodes.machine = { ... }:
10 imports = [ ./common/user-account.nix ];
11 services.xserver.enable = true;
12 services.xserver.desktopManager.retroarch = {
14 package = pkgs.retroarchBare;
16 services.xserver.displayManager = {
18 defaultSession = "RetroArch";
26 testScript = { nodes, ... }:
28 user = nodes.machine.config.users.users.alice;
29 xdo = "${pkgs.xdotool}/bin/xdotool";
31 with subtest("Wait for login"):
33 machine.wait_for_file("/tmp/xauth_*")
34 machine.succeed("xauth merge /tmp/xauth_*")
36 with subtest("Check RetroArch started"):
37 machine.wait_until_succeeds("pgrep retroarch")
38 machine.wait_for_window("^RetroArch ")
40 with subtest("Check configuration created"):
41 machine.wait_for_file("${user.home}/.config/retroarch/retroarch.cfg")
43 with subtest("Wait to get a screenshot"):
45 "${xdo} key Alt+F1 sleep 10"
47 machine.screenshot("screen")