lol

nixos tests: waitUntilTTYMatches: Log TTY contents on last try

If the test has not passed yet, on the last attempt it now outputs:

machine: Last chance to match /logine: / on TTY2, which currently contains:
machine: running command: fold -w$(stty -F /dev/tty2 size | awk '{print $2}') /dev/vcs2
machine: exit status 0
machine:

<<< Welcome to NixOS 17.09.git.a804ef4 (x86_64) - tty2 >>>

machine login:

to help debug the problem. Notice the "logine" typo in my check.

+6
+6
nixos/lib/test-driver/Machine.pm
··· 518 518 519 519 $self->nest("waiting for $regexp to appear on tty $tty", sub { 520 520 retry sub { 521 + my ($retries_remaining) = @_; 522 + if ($retries_remaining == 0) { 523 + $self->log("Last chance to match /$regexp/ on TTY$tty, which currently contains:"); 524 + $self->log($self->getTTYText($tty)); 525 + } 526 + 521 527 return 1 if $self->getTTYText($tty) =~ /$regexp/; 522 528 } 523 529 });