From e3264b086cd740f48ae6a51f9c3c24410f8ecba0 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 27 May 2014 15:00:02 +0200 Subject: [PATCH] Add option "output display" to tesh.pl. --- buildtools/Cmake/Scripts/tesh.pl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/buildtools/Cmake/Scripts/tesh.pl b/buildtools/Cmake/Scripts/tesh.pl index 0b819b1841..ec72da11c2 100755 --- a/buildtools/Cmake/Scripts/tesh.pl +++ b/buildtools/Cmake/Scripts/tesh.pl @@ -373,10 +373,14 @@ sub parse_out { # Check the result of execution ### my $diff; - if (!defined($cmd{'output ignore'})){ + if (defined($cmd{'output display'})){ + print "[Tesh/INFO] Here is the (ignored) command output:\n"; + map { print "||$_\n" } \@got; + } + elsif (!defined($cmd{'output ignore'})){ $diff = build_diff(\@{$cmd{'out'}}, \@got); }else{ - print "(ignoring the output of <$cmd{'file'}:$cmd{'line'}> as requested)\n" + print "(ignoring the output of <$cmd{'file'}:$cmd{'line'}> as requested)\n" } if (length $diff) { print "Output of <$cmd{'file'}:$cmd{'line'}> mismatch:\n"; @@ -522,6 +526,13 @@ LINE: while (not $finished and not $error) { } $cmd{'output ignore'} = 1; } + elsif($line =~ /^!\s*output display/){ #output display + if (defined($cmd{'cmd'})) { + exec_cmd(\%cmd); + %cmd = (); + } + $cmd{'output display'} = 1; + } elsif($line =~ /^!\s*expect signal (\w*)/) {#expect signal SIGABRT if (defined($cmd{'cmd'})) { exec_cmd(\%cmd); -- 2.20.1