2010-01-05 12:18:43 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine =
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
|
|
|
|
services.httpd.enable = true;
|
|
|
|
services.httpd.adminAddr = "foo@example.org";
|
|
|
|
services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
|
|
|
|
|
|
|
|
services.xserver.displayManager.slim.enable = false;
|
|
|
|
services.xserver.displayManager.kdm.enable = true;
|
|
|
|
services.xserver.displayManager.kdm.extraConfig =
|
|
|
|
''
|
|
|
|
[X-:0-Core]
|
|
|
|
AutoLoginEnable=true
|
|
|
|
AutoLoginUser=alice
|
|
|
|
AutoLoginPass=foobar
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.xserver.desktopManager.default = "kde4";
|
|
|
|
services.xserver.desktopManager.kde4.enable = true;
|
|
|
|
|
|
|
|
users.extraUsers = pkgs.lib.singleton
|
|
|
|
{ name = "alice";
|
|
|
|
description = "Alice Foobar";
|
|
|
|
home = "/home/alice";
|
|
|
|
createHome = true;
|
|
|
|
useDefaultShell = true;
|
|
|
|
password = "foobar";
|
2009-09-02 16:48:28 +02:00
|
|
|
};
|
2010-01-05 12:18:43 +01:00
|
|
|
};
|
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
|
|
|
''
|
2010-01-06 00:38:13 +01:00
|
|
|
$machine->waitForWindow(qr/plasma-desktop/);
|
2009-09-04 17:02:52 +02:00
|
|
|
|
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
|
|
|
|
2010-01-06 00:38:13 +01:00
|
|
|
sleep 5;
|
|
|
|
|
2010-01-05 12:35:59 +01:00
|
|
|
$machine->screenshot("screen");
|
2009-09-02 16:48:28 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
}
|