testsuite: grep the expected output only when needed
Currently the testsuite always try to extract the expected
output from the test case description.
This is done with grep & sed.
But in some case we're not interested to compare the actual
output with the expected one. And in those cases the grep & sed
are just wasted CPU cycles.
Fix this by extracting the expected output only when we know
that it won't be ignored.
This speedup the testsuite by a modest 1%.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>