From: Martin Quinson Date: Sat, 25 Jul 2015 17:27:59 +0000 (+0200) Subject: tesh now reports if the outputs were sorted on mismatch X-Git-Tag: v3_12~390 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3f1a266aa7b89e90628c41a58885f04ffa35db30 tesh now reports if the outputs were sorted on mismatch --- 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";