summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-04-21 11:40:52 +0100
committerGitHub <noreply@github.com>2018-04-21 11:40:52 +0100
commitbf6998bdfa8337cccf99f0a3a20dda38743d36ac (patch)
tree77e20343bf7b23d13074bfda0c88283f31a82f2c /nixos/tests
parentf27b83fd7e37606f71a0a41a46d8a218634c9816 (diff)
parent4c14202bd1e0384daeb8e241af20414dd8bf12e3 (diff)
downloadnixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar.gz
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar.bz2
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar.lz
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar.xz
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.tar.zst
nixlib-bf6998bdfa8337cccf99f0a3a20dda38743d36ac.zip
Merge pull request #39297 from xeji/tests/gnome3-gdm
nixos/tests/gnome3-gdm: fix broken test
Diffstat (limited to 'nixos/tests')
-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 4b459e93e1be..71ae1709d526 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");
     '';