3
0
Fork 0
forked from mirrors/nixpkgs

nixos tests: make getTTYText smart about tty size

This commit is contained in:
Graham Christensen 2017-02-12 18:16:18 -05:00
parent 939c846ae7
commit 59e77daf5b
No known key found for this signature in database
GPG key ID: 06121D366FE9435C

View file

@ -508,7 +508,7 @@ sub screenshot {
sub getTTYText { sub getTTYText {
my ($self, $tty) = @_; my ($self, $tty) = @_;
my ($status, $out) = $self->execute("fold -w 80 /dev/vcs${tty}"); my ($status, $out) = $self->execute("fold -w\$(stty -F /dev/tty${tty} size | awk '{print \$2}') /dev/vcs${tty}");
return $out; return $out;
} }