From 3f40fcabbf692ac08cee390ac9b56650ca075630 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 20 Jun 2017 21:16:35 -0400 Subject: nixos tests: waitForWindow: output a list of windows we see prior to the final check machine: must succeed: xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d' machine: exit status 0 machine: Last chance to match /(?^:dfiirst configuration)/ on the the window list, which currently contains: machine: [i3 con] container around 0xf8a5f0, i3: first configuration, [i3 con] floatingcon around 0xf8c260, [i3 con] container around 0xf8a380, i3bar for output Virtual-1, [i3 con] bottom dockarea Virtual-1, [i3 con] workspace 1, [i3 con] content Virtual-1, [i3 con] top dockarea Virtual-1, [i3 con] output Virtual-1, [i3 con] workspace __i3_scratch, [i3 con] content __i3, [i3 con] pseudo-output __i3, i3 --- nixos/lib/test-driver/Machine.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nixos/lib/test-driver/Machine.pm') diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index 4a68e0cd9dc..cd375352c4c 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -612,6 +612,13 @@ sub waitForWindow { $self->nest("waiting for a window to appear", sub { retry sub { my @names = $self->getWindowNames; + + my ($retries_remaining) = @_; + if ($retries_remaining == 0) { + $self->log("Last chance to match /$regexp/ on the the window list, which currently contains:"); + $self->log(join(", ", @names)); + } + foreach my $n (@names) { return 1 if $n =~ /$regexp/; } -- cgit 1.4.1