Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
f987530e
Commit
f987530e
authored
10 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Set line-wise comparison as default and ignore lines starting with "INSERTION:" tag
parent
4b8ee8a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scripts/pycompare.py
+6
-2
6 additions, 2 deletions
src/scripts/pycompare.py
with
6 additions
and
2 deletions
src/scripts/pycompare.py
+
6
−
2
View file @
f987530e
...
...
@@ -115,6 +115,8 @@ def compare_files(config):
print
(
"
INFO: using line-wise mode
"
)
print
(
"
INFO: counting result lines...
"
)
while
(
f_lines
[
0
]
!=
''
):
if
(
c_lines
[
0
].
startswith
(
"
INSERTION:
"
)):
c_lines
=
[
c_file
.
readline
()]
if
(
c_lines
[
0
]
!=
''
):
line_count
+=
1
else
:
...
...
@@ -166,6 +168,8 @@ def compare_files(config):
else
:
f_lines
=
[
fortran_file
.
readline
()]
c_lines
=
[
c_file
.
readline
()]
if
(
c_lines
[
0
].
startswith
(
"
INSERTION:
"
)):
c_lines
=
[
c_file
.
readline
()]
num_read_lines
+=
1
# Start here the comparison loop
if
(
len
(
f_lines
)
==
len
(
c_lines
)):
...
...
@@ -429,7 +433,7 @@ def parse_arguments():
'
fortran_file_name
'
:
''
,
'
c_file_name
'
:
''
,
'
full_log
'
:
False
,
'
linewise
'
:
Fals
e
,
'
linewise
'
:
Tru
e
,
'
log_html
'
:
False
,
'
html_output
'
:
'
pycompare.html
'
,
'
warning_threshold
'
:
0.005
,
...
...
@@ -475,7 +479,7 @@ def print_help():
print
(
"
--full Print all lines to log file (default prints only mismatches).
"
)
print
(
"
--help Print this help and exit.
"
)
print
(
"
--html[=OPT_OUTPUT_NAME] Enable logging to HTML file (default logs to
\"
pycompare.html
\"
).
"
)
print
(
"
--linewise Load only one line at a time. Useful to compare big files (
fals
e by default).
"
)
print
(
"
--linewise Load only one line at a time. Useful to compare big files (
Tru
e by default).
"
)
print
(
"
--quick Stop on first mismatch (default is to perform a full check).
"
)
print
(
"
--warn Set a fractional threshold for numeric warning (default = 0.005).
"
)
print
(
"
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment