diff options
author | Shea Levy <shea@shealevy.com> | 2014-01-22 14:23:56 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2014-01-22 14:23:56 -0500 |
commit | 51de280c0a425fa0ea039a504646a99da3605aca (patch) | |
tree | 7ac5167dd68f390729018dc03ec27a6a3acb1905 /nixos/lib/test-driver/Machine.pm | |
parent | 058fd7eeea3702f574bd972b548554c617eed587 (diff) | |
download | nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar.gz nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar.bz2 nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar.lz nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar.xz nixlib-51de280c0a425fa0ea039a504646a99da3605aca.tar.zst nixlib-51de280c0a425fa0ea039a504646a99da3605aca.zip |
nixos X tests: wait for logind to link a session to the server
There seems to be some race causing failures if an X command gets in before slim starts the session Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'nixos/lib/test-driver/Machine.pm')
-rw-r--r-- | nixos/lib/test-driver/Machine.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index a28214ea934f..8bef3d67b8d9 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -495,6 +495,8 @@ sub waitForX { my ($self, $regexp) = @_; $self->nest("waiting for the X11 server", sub { retry sub { + my ($status, $out) = $self->execute("journalctl -bu systemd-logind | grep Linked"); + return 0 if $status != 0; my ($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1"); return 1 if $status == 0; } |