1 import ./make-test-python.nix ({ pkgs, lib, ...} : {
2 name = "gnome-flashback";
3 meta.maintainers = lib.teams.gnome.members ++ [ lib.maintainers.chpatrick ];
5 nodes.machine = { nodes, ... }:
7 user = nodes.machine.users.users.alice;
10 { imports = [ ./common/user-account.nix ];
12 services.xserver.enable = true;
14 services.xserver.displayManager = {
19 services.displayManager.autoLogin = {
24 services.xserver.desktopManager.gnome.enable = true;
25 services.xserver.desktopManager.gnome.debug = true;
26 services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
27 services.displayManager.defaultSession = "gnome-flashback-metacity";
30 testScript = { nodes, ... }: let
31 user = nodes.machine.users.users.alice;
32 uid = toString user.uid;
33 xauthority = "/run/user/${uid}/gdm/Xauthority";
35 with subtest("Login to GNOME Flashback with GDM"):
37 machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
38 # Wait for alice to be logged in"
39 machine.wait_for_unit("default.target", "${user.name}")
40 machine.wait_for_file("${xauthority}")
41 machine.succeed("xauth merge ${xauthority}")
42 # Check that logging in has given the user ownership of devices
43 assert "alice" in machine.succeed("getfacl -p /dev/snd/timer")
45 with subtest("Wait for Metacity"):
46 machine.wait_until_succeeds("pgrep metacity")
48 with subtest("Regression test for #233920"):
49 machine.wait_until_succeeds("pgrep -fa gnome-flashback-media-keys")
51 machine.screenshot("screen")