Bug 330

Summary: Avoid using the external 'diff' command for regression testing
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: enhancement CC: ns-bugs
Priority: P3    
Version: ns-3.2   
Hardware: All   
OS: All   

Description Gustavo J. A. M. Carneiro 2008-09-10 10:26:51 UTC
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 UTC
Note to self, an additional refactoring needed is to move the check for mercurial presence into the configure stage.