Bug 330 - Avoid using the external 'diff' command for regression testing
Avoid using the external 'diff' command for regression testing
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3.2
All All
: P3 enhancement
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-10 10:26 EDT by Gustavo J. A. M. Carneiro
Modified: 2009-02-21 17:52 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2008-09-10 10:26:51 EDT
I just realized Python has builtin modules for comparing files, and so we could do diff'ing using only pure Python code:

http://docs.python.org/lib/module-filecmp.html
http://docs.python.org/lib/module-difflib.html

With some Python love, the trailing carriage return problem could be worked around.  Additionally, with no need for 'diff' it would be easier on MinGW users (no need to install MSys).

I will work on this some day "in the future", post-3.2.
Comment 1 Gustavo J. A. M. Carneiro 2008-09-10 10:28:37 EDT
Note to self, an additional refactoring needed is to move the check for mercurial presence into the configure stage.