summary refs log tree commit diff
path: root/nixos/tests/plasma5.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2017-02-28 19:09:56 -0600
committerThomas Tuegel <ttuegel@mailbox.org>2017-03-02 07:01:42 -0600
commit0da421ce17a0226e4880c596702adcc58cb19d6c (patch)
tree6f325383c8f9dc017597d664a0915fbd094def10 /nixos/tests/plasma5.nix
parent80e883a7c31b78124c48fa3f60111f1b60c64671 (diff)
downloadnixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar.gz
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar.bz2
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar.lz
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar.xz
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.tar.zst
nixpkgs-0da421ce17a0226e4880c596702adcc58cb19d6c.zip
nixos/tests: fix Plasma 5 test
Diffstat (limited to 'nixos/tests/plasma5.nix')
-rw-r--r--nixos/tests/plasma5.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix
new file mode 100644
index 00000000000..3dd5121607a
--- /dev/null
+++ b/nixos/tests/plasma5.nix
@@ -0,0 +1,51 @@
+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.plasma5.enable = true;
+    services.xserver.desktopManager.default = "plasma5";
+    virtualisation.writableStore = false; # FIXME
+  };
+
+  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");
+  '';
+})