Skip to content
Snippets Groups Projects
Commit b703aa41 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Ignore INSERTION lines also in pycompare ffile contents

parent 4073ffaf
No related branches found
No related tags found
No related merge requests found
...@@ -130,8 +130,11 @@ def compare_files(config): ...@@ -130,8 +130,11 @@ def compare_files(config):
print("INFO: using line-wise mode") print("INFO: using line-wise mode")
print("INFO: counting result lines...") print("INFO: counting result lines...")
while (f_lines[0] != ''): while (f_lines[0] != ''):
if (f_lines[0].startswith("INSERTION:")):
f_lines[0] = fortran_file.readline()
continue
if (c_lines[0].startswith("INSERTION:")): if (c_lines[0].startswith("INSERTION:")):
c_lines = [c_file.readline()] c_lines[0] = c_file.readline()
if (c_lines[0] != ''): if (c_lines[0] != ''):
line_count += 1 line_count += 1
else: else:
...@@ -186,8 +189,10 @@ def compare_files(config): ...@@ -186,8 +189,10 @@ def compare_files(config):
if (not config['linewise']): if (not config['linewise']):
line_loop = False line_loop = False
else: else:
f_lines = [fortran_file.readline()] f_lines[0] = fortran_file.readline()
c_lines = [c_file.readline()] if (f_lines[0].startswith("INSERTION:")):
continue
c_lines[0] = c_file.readline()
if (c_lines[0].startswith("INSERTION:")): if (c_lines[0].startswith("INSERTION:")):
c_lines = [c_file.readline()] c_lines = [c_file.readline()]
num_read_lines += 1 num_read_lines += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment