summary refs log tree commit diff
path: root/nixos/tests/gnome3-gdm.nix
diff options
context:
space:
mode:
authorxeji <xeji@cat3.de>2018-04-21 12:09:30 +0200
committerxeji <xeji@cat3.de>2018-04-21 12:09:30 +0200
commit4c14202bd1e0384daeb8e241af20414dd8bf12e3 (patch)
tree0aa483c5455c48b0c6a34e606329d6906c3e5459 /nixos/tests/gnome3-gdm.nix
parentcd5dfa1f883c9e7183e493f4dc35cbe624082676 (diff)
downloadnixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar.gz
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar.bz2
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar.lz
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar.xz
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.tar.zst
nixpkgs-4c14202bd1e0384daeb8e241af20414dd8bf12e3.zip
nixos/tests/gnome3-gdm: fix broken test
test always failed due to multiple bugs
Diffstat (limited to 'nixos/tests/gnome3-gdm.nix')
-rw-r--r--nixos/tests/gnome3-gdm.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/tests/gnome3-gdm.nix b/nixos/tests/gnome3-gdm.nix
index 4b459e93e1b..71ae1709d52 100644
--- a/nixos/tests/gnome3-gdm.nix
+++ b/nixos/tests/gnome3-gdm.nix
@@ -26,15 +26,22 @@ import ./make-test.nix ({ pkgs, ...} : {
 
   testScript =
     ''
+      # wait for gdm to start and bring up X
+      $machine->waitForUnit("display-manager.service");
       $machine->waitForX;
-      $machine->sleep(15);
+
+      # wait for alice to be logged in
+      $machine->waitForUnit("default.target","alice");
 
       # Check that logging in has given the user ownership of devices.
       $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
 
-      $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
-      $machine->succeed("xauth merge ~alice/.Xauthority");
+      # open a terminal and check it's there
+      $machine->succeed("su - alice -c 'DISPLAY=:0.0 XAUTHORITY=/run/user/\$UID/gdm/Xauthority gnome-terminal'");
+      $machine->succeed("xauth merge /run/user/1000/gdm/Xauthority");
       $machine->waitForWindow(qr/Terminal/);
+
+      # wait to get a nice screenshot
       $machine->sleep(20);
       $machine->screenshot("screen");
     '';