2015-09-15 12:25:19 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
|
|
|
name = "gnome3-gdm";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ lethalman ];
|
|
|
|
};
|
|
|
|
|
|
|
|
machine =
|
2018-07-20 20:56:59 +00:00
|
|
|
{ ... }:
|
2015-09-15 12:25:19 +00:00
|
|
|
|
|
|
|
{ imports = [ ./common/user-account.nix ];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
2017-03-30 10:21:32 +00:00
|
|
|
services.xserver.displayManager.slim.enable = false;
|
2015-09-15 12:25:19 +00:00
|
|
|
services.xserver.displayManager.gdm = {
|
|
|
|
enable = true;
|
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.xserver.desktopManager.gnome3.enable = true;
|
|
|
|
|
2017-09-28 14:58:45 +00:00
|
|
|
virtualisation.memorySize = 1024;
|
2015-09-15 12:25:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
2018-04-21 10:09:30 +00:00
|
|
|
# wait for gdm to start and bring up X
|
|
|
|
$machine->waitForUnit("display-manager.service");
|
2015-09-15 12:25:19 +00:00
|
|
|
$machine->waitForX;
|
2018-04-21 10:09:30 +00:00
|
|
|
|
|
|
|
# wait for alice to be logged in
|
|
|
|
$machine->waitForUnit("default.target","alice");
|
2015-09-15 12:25:19 +00:00
|
|
|
|
|
|
|
# Check that logging in has given the user ownership of devices.
|
|
|
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
|
|
|
|
2018-04-21 10:09:30 +00:00
|
|
|
# open a terminal and check it's there
|
|
|
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 XAUTHORITY=/run/user/\$UID/gdm/Xauthority gnome-terminal'");
|
|
|
|
$machine->succeed("xauth merge /run/user/1000/gdm/Xauthority");
|
2015-09-15 12:25:19 +00:00
|
|
|
$machine->waitForWindow(qr/Terminal/);
|
2018-04-21 10:09:30 +00:00
|
|
|
|
|
|
|
# wait to get a nice screenshot
|
2015-09-15 12:25:19 +00:00
|
|
|
$machine->sleep(20);
|
|
|
|
$machine->screenshot("screen");
|
|
|
|
'';
|
|
|
|
})
|