nixos: add most basic gnome3 test and take a screenshot

This commit is contained in:
Domen Kožar 2014-02-08 21:47:28 +01:00
parent 9c95b1151a
commit 028379be28
3 changed files with 33 additions and 0 deletions

View File

@ -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)

View File

@ -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);

31
nixos/tests/gnome3.nix Normal file
View File

@ -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");
'';
}