nixpkgs/nixos/tests/kde5.nix
aszlig 02a9da65c9
nixos: Disable OCR for tests that do not use it
Found out during testing of the Tesseract upgrade the kde5 and sddm
tests don't actually use OCR, so let's disable support for it.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @ttuegel
2016-12-19 22:25:42 +01:00

50 lines
1.3 KiB
Nix

import ./make-test.nix ({ pkgs, ...} :
{
name = "kde5";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ttuegel ];
};
machine = { lib, ... }: {
imports = [ ./common/user-account.nix ];
virtualisation.memorySize = 1024;
services.xserver.enable = true;
services.xserver.displayManager.sddm = {
enable = true;
autoLogin = {
enable = true;
user = "alice";
};
};
services.xserver.desktopManager.kde5.enable = true;
};
testScript = { nodes, ... }:
let xdo = "${pkgs.xdotool}/bin/xdotool"; in
''
startAll;
$machine->waitForFile("/home/alice/.Xauthority");
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitUntilSucceeds("pgrep plasmashell");
$machine->waitForWindow("^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 dolphin &'");
$machine->waitForWindow(" Dolphin");
$machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'");
$machine->waitForWindow("Konsole");
$machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'");
$machine->waitForWindow("Settings");
$machine->execute("${xdo} key Alt+F1 sleep 10");
$machine->screenshot("screen");
'';
})