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 = {
23 services.xserver.desktopManager.gnome.enable = true;
24 services.xserver.desktopManager.gnome.debug = true;
25 services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
26 services.xserver.displayManager.defaultSession = "gnome-flashback-metacity";
29 testScript = { nodes, ... }: let
30 user = nodes.machine.users.users.alice;
31 uid = toString user.uid;
32 xauthority = "/run/user/${uid}/gdm/Xauthority";
34 with subtest("Login to GNOME Flashback with GDM"):
35 # wait_for_x() checks graphical-session.target, which is expected to be
36 # inactive on gnome-flashback before #228946 (i.e. systemd managed
37 # gnome-session) is done.
38 # https://github.com/NixOS/nixpkgs/pull/208060
40 # Previously this was unconditionally touched by xsessionWrapper but was
41 # changed in #233981 (we have GNOME-Flashback:GNOME in XDG_CURRENT_DESKTOP).
42 # machine.wait_for_x()
43 machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
44 # Wait for alice to be logged in"
45 machine.wait_for_unit("default.target", "${user.name}")
46 machine.wait_for_file("${xauthority}")
47 machine.succeed("xauth merge ${xauthority}")
48 # Check that logging in has given the user ownership of devices
49 assert "alice" in machine.succeed("getfacl -p /dev/snd/timer")
51 with subtest("Wait for Metacity"):
52 machine.wait_until_succeeds(
56 machine.screenshot("screen")