[contrib] validate_failures.py: Improve error reporting
Make sure both "tool" and "exp" properties are set when
processing result entries.
Change-Id: I6752b3e0db722dc4aec2db9a351cba36027a863d
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 5a4df6b..d7d0c91 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -300,12 +300,11 @@
(_, line) = SplitAttributesFromSummaryLine(line)
interesting_result = bool(_INTERESTING_RESULTS_REX.match(line))
- # If there's no tool defined it means that either the results section hasn't
+ # If there's no .exp defined it means that either the results section hasn't
# started yet, or it is already over.
- if interesting_result and result_set.current_tool is None:
+ if interesting_result and result_set.current_exp is None:
if _OPTIONS.verbosity >= 3:
- print(f'WARNING: Result "{line}" found outside sum file boundaries.',
- file=sys.stderr)
+ print(f'WARNING: Result "{line}" found outside sum file boundaries.')
return False
return interesting_result
@@ -379,6 +378,7 @@
result_set.current_exp)
elif IsToolLine(orig_line):
result_set.current_tool = _TOOL_LINE_REX.match(orig_line).groups()[0]
+ result_set.current_exp = None
elif IsSummaryLine(orig_line):
result_set.ResetToolExp()
else: