nixosTests.retroarch: fix test by changing window title (#354067)

This commit is contained in:
Weijia Wang 2024-11-09 01:03:07 +01:00 committed by GitHub
commit da5252dd31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,14 @@
import ./make-test-python.nix ({ pkgs, ... }:
import ./make-test-python.nix (
{ pkgs, ... }:
{
name = "retroarch";
meta = with pkgs.lib; { maintainers = teams.libretro.members ++ [ maintainers.j0hax ]; };
meta = with pkgs.lib; {
maintainers = teams.libretro.members ++ [ maintainers.j0hax ];
};
nodes.machine = { ... }:
nodes.machine =
{ ... }:
{
imports = [ ./common/user-account.nix ];
@ -23,11 +27,13 @@ import ./make-test-python.nix ({ pkgs, ... }:
};
};
testScript = { nodes, ... }:
testScript =
{ nodes, ... }:
let
user = nodes.machine.config.users.users.alice;
xdo = "${pkgs.xdotool}/bin/xdotool";
in ''
in
''
with subtest("Wait for login"):
start_all()
machine.wait_for_file("/tmp/xauth_*")
@ -35,7 +41,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
with subtest("Check RetroArch started"):
machine.wait_until_succeeds("pgrep retroarch")
machine.wait_for_window("^RetroArch ")
machine.wait_for_window("^RetroArch")
with subtest("Check configuration created"):
machine.wait_for_file("${user.home}/.config/retroarch/retroarch.cfg")
@ -46,4 +52,5 @@ import ./make-test-python.nix ({ pkgs, ... }:
)
machine.screenshot("screen")
'';
})
}
)