2014-04-14 14:02:44 +02:00
|
|
|
import ./make-test.nix ({ pkgs, ... }: {
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "kde4";
|
2015-07-12 12:09:40 +02:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = [ domenkozar eelco chaoflow ];
|
2015-07-12 12:09:40 +02:00
|
|
|
};
|
2010-01-05 12:18:43 +01:00
|
|
|
|
2011-09-14 20:20:50 +02:00
|
|
|
machine =
|
2010-01-05 12:18:43 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2013-09-04 13:05:09 +02:00
|
|
|
{ imports = [ ./common/user-account.nix ];
|
2011-03-17 15:04:47 +01:00
|
|
|
|
2014-04-25 17:27:05 +02:00
|
|
|
virtualisation.memorySize = 1024;
|
2013-07-09 15:16:04 +02:00
|
|
|
|
2011-03-17 15:04:47 +01:00
|
|
|
services.xserver.enable = true;
|
2010-01-05 12:18:43 +01:00
|
|
|
|
|
|
|
services.httpd.enable = true;
|
|
|
|
services.httpd.adminAddr = "foo@example.org";
|
2015-08-28 13:27:51 +02:00
|
|
|
services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
|
2010-01-05 12:18:43 +01:00
|
|
|
|
|
|
|
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;
|
2013-07-17 14:54:25 +02:00
|
|
|
|
|
|
|
# Include most of KDE. We don't really test these here, but at
|
|
|
|
# least they should build.
|
|
|
|
environment.systemPackages =
|
|
|
|
[ pkgs.kde4.kdemultimedia
|
|
|
|
pkgs.kde4.kdegraphics
|
|
|
|
pkgs.kde4.kdeutils
|
|
|
|
pkgs.kde4.kdegames
|
2014-09-29 13:31:37 +02:00
|
|
|
#pkgs.kde4.kdeedu
|
2013-07-17 14:54:25 +02:00
|
|
|
pkgs.kde4.kdeaccessibility
|
|
|
|
pkgs.kde4.kdeadmin
|
|
|
|
pkgs.kde4.kdenetwork
|
|
|
|
pkgs.kde4.kdetoys
|
|
|
|
pkgs.kde4.kdewebdev
|
2016-04-12 19:12:47 +02:00
|
|
|
pkgs.xorg.xmessage
|
2013-07-17 14:54:25 +02:00
|
|
|
];
|
2010-01-05 12:18:43 +01:00
|
|
|
};
|
2009-09-02 16:48:28 +02:00
|
|
|
|
2016-04-12 19:12:47 +02:00
|
|
|
testScript = ''
|
2011-03-15 08:23:37 +01:00
|
|
|
$machine->waitUntilSucceeds("pgrep plasma-desktop");
|
2016-04-12 19:12:47 +02:00
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
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.
|
2012-10-24 18:22:53 +02:00
|
|
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
2010-03-09 12:43:56 +01:00
|
|
|
|
2010-01-05 12:57:17 +01:00
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
|
2010-01-06 00:38:13 +01:00
|
|
|
$machine->waitForWindow(qr/messages.*KWrite/);
|
2013-07-17 14:54:25 +02:00
|
|
|
|
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
|
2010-01-06 00:38:13 +01:00
|
|
|
$machine->waitForWindow(qr/Valgrind.*Konqueror/);
|
2010-01-05 12:35:59 +01:00
|
|
|
|
2013-07-17 14:54:25 +02:00
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 gwenview ${pkgs.kde4.kde_wallpapers}/share/wallpapers/Hanami/contents/images/1280x1024.jpg &'");
|
|
|
|
$machine->waitForWindow(qr/Gwenview/);
|
|
|
|
|
|
|
|
$machine->sleep(10);
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2016-04-12 19:12:47 +02:00
|
|
|
$machine->screenshot("screen");
|
2009-09-02 16:48:28 +02:00
|
|
|
'';
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2014-04-14 14:02:44 +02:00
|
|
|
})
|