2010-01-05 12:18:43 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine =
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2011-03-17 15:04:47 +01:00
|
|
|
{ require = [ ./common/user-account.nix ];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
2010-01-05 12:18:43 +01:00
|
|
|
|
|
|
|
services.httpd.enable = true;
|
|
|
|
services.httpd.adminAddr = "foo@example.org";
|
|
|
|
services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
|
|
|
|
|
|
|
|
services.xserver.displayManager.kdm.enable = true;
|
|
|
|
services.xserver.displayManager.kdm.extraConfig =
|
|
|
|
''
|
|
|
|
[X-:0-Core]
|
|
|
|
AutoLoginEnable=true
|
|
|
|
AutoLoginUser=alice
|
|
|
|
AutoLoginPass=foobar
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.xserver.desktopManager.kde4.enable = true;
|
|
|
|
};
|
2009-09-02 16:48:28 +02:00
|
|
|
|
2010-01-05 12:18:43 +01:00
|
|
|
testScript =
|
2009-09-02 16:48:28 +02:00
|
|
|
''
|
2011-03-15 08:23:37 +01:00
|
|
|
$machine->waitUntilSucceeds("pgrep plasma-desktop");
|
2010-01-06 00:38:13 +01:00
|
|
|
$machine->waitForWindow(qr/plasma-desktop/);
|
2009-09-04 17:02:52 +02:00
|
|
|
|
2010-03-09 12:43:56 +01:00
|
|
|
# Check that logging in has given the user ownership of devices.
|
|
|
|
$machine->mustSucceed("getfacl /dev/snd/timer | grep -q alice");
|
|
|
|
|
2010-01-05 12:57:17 +01:00
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
|
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
|
2009-09-02 16:48:28 +02:00
|
|
|
|
2010-01-06 00:38:13 +01:00
|
|
|
$machine->waitForWindow(qr/messages.*KWrite/);
|
|
|
|
$machine->waitForWindow(qr/Valgrind.*Konqueror/);
|
2010-01-05 12:35:59 +01:00
|
|
|
|
2011-01-10 15:41:16 +01:00
|
|
|
$machine->sleep(5);
|
2010-01-06 00:38:13 +01:00
|
|
|
|
2010-01-05 12:35:59 +01:00
|
|
|
$machine->screenshot("screen");
|
2009-09-02 16:48:28 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
}
|