Tools: autotest: strip newline chars for comparing mission files

Windows is different from other OSes so remove the newline characters before comparing lines when making sure mission files are the same
This commit is contained in:
Francisco Ferreira 2018-12-14 17:22:21 +00:00 committed by Andrew Tridgell
parent ba2f954a20
commit 08fdd5c36c

View File

@ -501,6 +501,8 @@ class AutoTest(ABC):
f1 = open(file1)
f2 = open(file2)
for l1, l2 in itertools.izip(f1, f2):
l1 = l1.rstrip("\r\n")
l2 = l2.rstrip("\r\n")
if l1 == l2:
# e.g. the first "QGC WPL 110" line
continue