nixos tests: add gdm test
This commit is contained in:
parent
1e24c18d18
commit
dfeee51818
|
@ -226,6 +226,7 @@ in rec {
|
|||
tests.fleet = hydraJob (import tests/fleet.nix { system = "x86_64-linux"; });
|
||||
#tests.gitlab = callTest tests/gitlab.nix {};
|
||||
tests.gnome3 = callTest tests/gnome3.nix {};
|
||||
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
|
||||
tests.i3wm = callTest tests/i3wm.nix {};
|
||||
tests.installer.grub1 = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).grub1.test);
|
||||
tests.installer.lvm = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).lvm.test);
|
||||
|
|
39
nixos/tests/gnome3-gdm.nix
Normal file
39
nixos/tests/gnome3-gdm.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "gnome3-gdm";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ lethalman ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
};
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
|
||||
virtualisation.memorySize = 512;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
$machine->sleep(15);
|
||||
|
||||
# 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 &'");
|
||||
$machine->waitForWindow(qr/Terminal/);
|
||||
$machine->sleep(20);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue