nixpkgs/nixos/tests/kde4.nix

71 lines
2.1 KiB
Nix
Raw Normal View History

import ./make-test.nix ({ pkgs, ... }: {
2014-06-28 15:04:49 +01:00
name = "kde4";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ domenkozar eelco chaoflow ];
};
machine =
{ config, pkgs, ... }:
{ imports = [ ./common/user-account.nix ];
2014-04-25 16:27:05 +01:00
virtualisation.memorySize = 1024;
services.xserver.enable = true;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
2015-08-28 12:27:51 +01:00
services.httpd.documentRoot = "${pkgs.valgrind.doc}/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;
2013-07-17 13:54:25 +01: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
#pkgs.kde4.kdeedu
2013-07-17 13:54:25 +01:00
pkgs.kde4.kdeaccessibility
pkgs.kde4.kdeadmin
pkgs.kde4.kdenetwork
pkgs.kde4.kdetoys
pkgs.kde4.kdewebdev
pkgs.xorg.xmessage
2013-07-17 13:54:25 +01:00
];
};
testScript = ''
$machine->waitUntilSucceeds("pgrep plasma-desktop");
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitForWindow(qr/plasma-desktop/);
# Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
$machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
$machine->waitForWindow(qr/messages.*KWrite/);
2013-07-17 13:54:25 +01:00
$machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
$machine->waitForWindow(qr/Valgrind.*Konqueror/);
2013-07-17 13:54:25 +01: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);
$machine->screenshot("screen");
'';
})