2015-07-12 12:09:40 +02:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "gnome3";
|
2015-07-12 12:09:40 +02:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = [ domenkozar eelco chaoflow lethalman ];
|
2015-07-12 12:09:40 +02:00
|
|
|
};
|
2014-02-08 21:47:28 +01:00
|
|
|
|
|
|
|
machine =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ ... }:
|
2014-02-08 21:47:28 +01:00
|
|
|
|
|
|
|
{ imports = [ ./common/user-account.nix ];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
2018-06-09 22:02:48 +02:00
|
|
|
services.xserver.displayManager.lightdm.enable = true;
|
|
|
|
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
|
|
|
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
2014-02-08 21:47:28 +01:00
|
|
|
services.xserver.desktopManager.gnome3.enable = true;
|
2018-07-28 18:23:35 +02:00
|
|
|
services.xserver.desktopManager.default = "gnome";
|
2014-11-02 16:33:10 +01:00
|
|
|
|
2017-09-01 07:49:35 +02:00
|
|
|
virtualisation.memorySize = 1024;
|
2014-02-08 21:47:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
$machine->waitForX;
|
2018-06-09 22:02:48 +02:00
|
|
|
|
|
|
|
# wait for alice to be logged in
|
|
|
|
$machine->waitForUnit("default.target","alice");
|
2014-02-08 21:47:28 +01:00
|
|
|
|
|
|
|
# Check that logging in has given the user ownership of devices.
|
|
|
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
|
|
|
|
|
|
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
2016-04-12 19:12:47 +02:00
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
2014-02-08 21:47:28 +01:00
|
|
|
$machine->waitForWindow(qr/Terminal/);
|
2016-12-29 16:19:43 +01: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 18:29:08 +02:00
|
|
|
$machine->sleep(10);
|
2014-02-08 21:47:28 +01:00
|
|
|
$machine->screenshot("screen");
|
|
|
|
'';
|
2015-07-12 12:09:40 +02:00
|
|
|
})
|