nixos: add most basic gnome3 test and take a screenshot
This commit is contained in:
parent
9c95b1151a
commit
028379be28
|
@ -61,6 +61,7 @@ in rec {
|
|||
(all nixos.tests.printing)
|
||||
(all nixos.tests.proxy)
|
||||
(all nixos.tests.xfce)
|
||||
(all nixos.tests.gnome3)
|
||||
|
||||
nixpkgs.tarball
|
||||
(all nixpkgs.emacs)
|
||||
|
|
|
@ -12,6 +12,7 @@ with import ../lib/testing.nix { inherit system minimal; };
|
|||
firewall = makeTest (import ./firewall.nix);
|
||||
installer = makeTests (import ./installer.nix);
|
||||
efi-installer = makeTests (import ./efi-installer.nix);
|
||||
gnome3 = makeTest (import ./gnome3.nix);
|
||||
ipv6 = makeTest (import ./ipv6.nix);
|
||||
kde4 = makeTest (import ./kde4.nix);
|
||||
#kexec = makeTest (import ./kexec.nix);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.auto.enable = true;
|
||||
services.xserver.displayManager.auto.user = "alice";
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
};
|
||||
|
||||
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(10);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
|
||||
}
|
Loading…
Reference in New Issue