nixos/tests/sddm-kde5: don't run tests through krunner

(cherry picked from commit 1f510dc7cd1dbb67bbf6574983de1dc5ebde1a1d)
This commit is contained in:
Thomas Tuegel 2016-09-09 10:09:45 -05:00
parent d7f1af2fba
commit 0fdaae8be4
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59

View File

@ -24,29 +24,26 @@ import ./make-test.nix ({ pkgs, ...} :
testScript = { nodes, ... }: testScript = { nodes, ... }:
let xdo = "${pkgs.xdotool}/bin/xdotool"; in let xdo = "${pkgs.xdotool}/bin/xdotool"; in
'' ''
sub krunner { startAll;
my ($win,) = @_;
$machine->execute("${xdo} key Alt+F2 sleep 1 type $win"); $machine->waitForFile("/home/alice/.Xauthority");
$machine->execute("${xdo} search --sync --onlyvisible --class krunner sleep 5 key Return"); $machine->succeed("xauth merge ~alice/.Xauthority");
}
$machine->waitUntilSucceeds("pgrep plasmashell"); $machine->waitUntilSucceeds("pgrep plasmashell");
$machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow("^Desktop ");
$machine->waitForWindow(qr/Desktop.*/);
# Check that logging in has given the user ownership of devices. # Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl /dev/snd/timer | grep -q alice"); $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
krunner("dolphin"); $machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'");
$machine->waitForWindow(qr/.*Dolphin/); $machine->waitForWindow(" Dolphin");
krunner("konsole"); $machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'");
$machine->waitForWindow(qr/.*Konsole/); $machine->waitForWindow("Konsole");
krunner("systemsettings5"); $machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'");
$machine->waitForWindow(qr/.*Settings/); $machine->waitForWindow("Settings");
$machine->sleep(20);
$machine->execute("${xdo} key Alt+F1 sleep 10"); $machine->execute("${xdo} key Alt+F1 sleep 10");
$machine->screenshot("screen"); $machine->screenshot("screen");