nixos tests: make getTTYText smart about tty size
commit59e77daf5b077d6f9b1e940a6c884bf0637f1732
authorGraham Christensen <graham@grahamc.com>
dateSun 12 Feb 2017, 18:16 (10 years ago)
parent939c846
nixos/lib/test-driver/Machine.pm+1−1
@@ -508,7 +508,7 @@ sub screenshot {
508508sub getTTYText {
509509 my ($self, $tty) = @_;
510510
511− my ($status, $out) = $self->execute("fold -w 80 /dev/vcs${tty}");
511+ my ($status, $out) = $self->execute("fold -w\$(stty -F /dev/tty${tty} size | awk '{print \$2}') /dev/vcs${tty}");
512512 return $out;
513513}
514514