mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos tests: waitForText: output the detected screen content prior to the last attempt
machine: Last chance to match /(?^:BALICE)/ on the screen, which currently contains: machine: performing optical character recognition machine: sending monitor command: screendump /tmp/nix-build-vm-test-run-sddm.drv-0/ocrin.ppm machine: Session Layout O O 0 1 : 0 9 Wednesday, June 21, 2017 |_ I Select your user and enter password
This commit is contained in:
parent
348785eec0
commit
1b833015b7
1 changed files with 6 additions and 0 deletions
|
@ -572,6 +572,12 @@ sub waitForText {
|
||||||
my ($self, $regexp) = @_;
|
my ($self, $regexp) = @_;
|
||||||
$self->nest("waiting for $regexp to appear on the screen", sub {
|
$self->nest("waiting for $regexp to appear on the screen", sub {
|
||||||
retry sub {
|
retry sub {
|
||||||
|
my ($retries_remaining) = @_;
|
||||||
|
if ($retries_remaining == 0) {
|
||||||
|
$self->log("Last chance to match /$regexp/ on the screen, which currently contains:");
|
||||||
|
$self->log($self->getScreenText);
|
||||||
|
}
|
||||||
|
|
||||||
return 1 if $self->getScreenText =~ /$regexp/;
|
return 1 if $self->getScreenText =~ /$regexp/;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue