From 3f1a266aa7b89e90628c41a58885f04ffa35db30 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 25 Jul 2015 19:27:59 +0200 Subject: [PATCH] tesh now reports if the outputs were sorted on mismatch --- tools/tesh/tesh.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/tesh/tesh.pl b/tools/tesh/tesh.pl index 9f218e9101..4ae67a0b11 100755 --- a/tools/tesh/tesh.pl +++ b/tools/tesh/tesh.pl @@ -341,7 +341,7 @@ sub parse_out { shift @got; } - #also resort the other one, as perl sort is not the same as the C one used to generate teshes + # Sort the expected output to make it easier to write for humans if(defined($cmd{'out'})){ @{$cmd{'out'}}=sort mysort @{$cmd{'out'}}; while (@{$cmd{'out'}} and ${$cmd{'out'}}[0] eq "") { @@ -396,6 +396,9 @@ sub parse_out { } if (length $diff) { print "Output of <$cmd{'file'}:$cmd{'line'}> mismatch:\n"; + if ($cmd{'sort'}) { + print "WARNING: both the observed output and expected output were sorted as requested\n"; + } map { print "$_\n" } split(/\n/,$diff); print "Test suite `$cmd{'file'}': NOK (<$cmd{'file'}:$cmd{'line'}> output mismatch)\n"; -- 2.20.1