Skip to content

Commit

Permalink
python: Fixed fingerprint mismatch search to look for stdout and stde…
Browse files Browse the repository at this point in the history
…rr too.

Omnetpp 6.x uses stdout, 7.x uses stderr.
  • Loading branch information
levy committed Feb 15, 2024
1 parent c9c1a3a commit 85e77d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/inet/test/fingerprint/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,15 @@ def get_calculated_fingerprint(simulation_result, ingredients):
if match:
value = match.groups()[0]
else:
match = re.search("Fingerprint mismatch! calculated:.*? ([0-9a-f]{4}-[0-9a-f]{4})/" + ingredients + ".*expected", stderr)
match = re.search("Fingerprint mismatch! calculated:.*? ([0-9a-f]{4}-[0-9a-f]{4})/" + ingredients + ".*expected", stdout)
if match:
value = match.groups()[0]
else:
return None
match = re.search("Fingerprint mismatch! calculated:.*? ([0-9a-f]{4}-[0-9a-f]{4})/" + ingredients + ".*expected", stderr)
if match:
value = match.groups()[0]
else:
return None
return Fingerprint(value, ingredients)

def check_fingerprint_test_group(simulation_result, fingerprint_test_group, **kwargs):
Expand Down

0 comments on commit 85e77d8

Please sign in to comment.