[LLVMdev] LNT ClamAV - Sorting output

Renato Golin renato.golin at linaro.org
Tue Apr 2 10:05:47 PDT 2013


Hi all,

Looking into ClamAV, it seems that the output is highly asynchronous, so a
simple diff is obviously bogus. Since the output is mainly a report of
what's happening, without any logical sequence, I can sort both outputs and
diff them, for a similar (though not perfect) result. If you sort
clamscan.out-nat and clamscan.out-simple, you'll see that they're identical.

I'm not sure if there is an option to run the program in sequential mode
(if there is, the test will pass), but if not, the simplest way to fix the
diff is to sort the reference_output and the program's output on execution.

Adding "| sort" to the RUN_OPTIONS didn't have the desired effect (that was
a long shot, anyway), does anyone know of a way to sort the output of a
program on those Makefiles? Maybe a rule that can be intermediary of the
final rule (I'm guessing $PROGRAM) that I can add a few steps before the
diff?

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130402/829bf126/attachment.html>


More information about the llvm-dev mailing list