2015-07-12 10:09:40 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
2019-08-06 22:20:26 +00:00
|
|
|
name = "gnome3-xorg";
|
2015-07-12 10:09:40 +00:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2019-08-06 22:32:52 +00:00
|
|
|
maintainers = pkgs.gnome3.maintainers;
|
2015-07-12 10:09:40 +00:00
|
|
|
};
|
2014-02-08 20:47:28 +00:00
|
|
|
|
|
|
|
machine =
|
2018-07-20 20:56:59 +00:00
|
|
|
{ ... }:
|
2014-02-08 20:47:28 +00:00
|
|
|
|
|
|
|
{ imports = [ ./common/user-account.nix ];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
2018-08-20 12:25:25 +00:00
|
|
|
services.xserver.displayManager.gdm.enable = false;
|
2018-06-09 20:02:48 +00:00
|
|
|
services.xserver.displayManager.lightdm.enable = true;
|
|
|
|
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
|
|
|
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
2014-02-08 20:47:28 +00:00
|
|
|
services.xserver.desktopManager.gnome3.enable = true;
|
2018-12-09 12:19:42 +00:00
|
|
|
services.xserver.desktopManager.default = "gnome-xorg";
|
2014-11-02 15:33:10 +00:00
|
|
|
|
2017-09-01 05:49:35 +00:00
|
|
|
virtualisation.memorySize = 1024;
|
2014-02-08 20:47:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
$machine->waitForX;
|
2018-06-09 20:02:48 +00:00
|
|
|
|
|
|
|
# wait for alice to be logged in
|
|
|
|
$machine->waitForUnit("default.target","alice");
|
2014-02-08 20:47:28 +00:00
|
|
|
|
|
|
|
# Check that logging in has given the user ownership of devices.
|
2019-10-11 21:20:57 +00:00
|
|
|
$machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
|
2014-02-08 20:47:28 +00:00
|
|
|
|
|
|
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
2016-04-12 17:12:47 +00:00
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
2018-12-09 18:27:06 +00:00
|
|
|
$machine->waitForWindow(qr/alice.*machine/);
|
2016-12-29 15:19:43 +00:00
|
|
|
$machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
|
2015-09-30 16:29:08 +00:00
|
|
|
$machine->sleep(10);
|
2014-02-08 20:47:28 +00:00
|
|
|
$machine->screenshot("screen");
|
|
|
|
'';
|
2015-07-12 10:09:40 +00:00
|
|
|
})
|