* Add a very basic test for Xfce.

svn path=/nixos/trunk/; revision=26284
This commit is contained in:
Eelco Dolstra 2011-03-11 17:00:10 +00:00
parent cd30b40da7
commit ff458f3fc8
3 changed files with 37 additions and 0 deletions

View file

@ -175,6 +175,7 @@ let
remote_builds = t.remote_builds.test;
subversion = t.subversion.report;
trac = t.trac.test;
xfce = t.trac.xfce;
};
};

View file

@ -24,4 +24,5 @@ with import ../lib/testing.nix { inherit nixpkgs services system; };
simple = makeTest (import ./simple.nix);
subversion = makeTest (import ./subversion.nix);
trac = makeTest (import ./trac.nix);
xfce = makeTest (import ./xfce.nix);
}

35
tests/xfce.nix Normal file
View file

@ -0,0 +1,35 @@
{ pkgs, ... }:
{
machine =
{ config, pkgs, ... }:
{ services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true;
services.xserver.displayManager.auto.user = "alice";
services.xserver.desktopManager.xfce.enable = true;
users.extraUsers = pkgs.lib.singleton
{ name = "alice";
description = "Alice Foobar";
home = "/home/alice";
createHome = true;
useDefaultShell = true;
password = "foobar";
};
};
testScript =
''
$machine->waitForWindow(qr/Tips/);
$machine->sleep(10);
$machine->succeed("su - alice -c 'DISPLAY=:0.0 Terminal &'");
$machine->waitForWindow(qr/Terminal/);
$machine->sleep(10);
$machine->screenshot("screen");
'';
}