diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-03-10 23:22:34 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-03-10 23:22:34 +0100 |
commit | 2157ebb067bee3cb37c4d9df5a1f3248018f4326 (patch) | |
tree | 6715952bca39edf6a201e94e0444c7460d76f1db /contrib | |
parent | bcc6fe58251b317127ec9c3291a798da7459d377 (diff) | |
parent | 985d6480fe52a5b109960117ba6a876dd875157e (diff) | |
download | gcc-2157ebb067bee3cb37c4d9df5a1f3248018f4326.zip gcc-2157ebb067bee3cb37c4d9df5a1f3248018f4326.tar.gz gcc-2157ebb067bee3cb37c4d9df5a1f3248018f4326.tar.bz2 |
Merge commit '4f01ae3761ca1f8dd7a33b833ae30624f047ac9c^' into HEAD
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 5 | ||||
-rwxr-xr-x | contrib/testsuite-management/validate_failures.py | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 2aa559fb..9b73cdd 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2023-06-17 Thiago Jung Bauermann <thiago.bauermann@linaro.org> + + * testsuite-management/validate_failures.py (IsInterestingResult): + Add result_set argument and use it. Adjust callers. + 2023-06-14 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> * testsuite-management/validate_failures.py (TestResult,) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 4dfd9cd..11bb6f7 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -295,10 +295,20 @@ def SplitAttributesFromSummaryLine(line): return (attrs, line) -def IsInterestingResult(line): +def IsInterestingResult(result_set, line): """Return True if line is one of the summary lines we care about.""" (_, line) = SplitAttributesFromSummaryLine(line) - return bool(_VALID_TEST_RESULTS_REX.match(line)) + valid_result = bool(_VALID_TEST_RESULTS_REX.match(line)) + + # If there's no tool defined it means that either the results section hasn't + # started yet, or it is already over. + if valid_result and result_set.current_tool is None: + if _OPTIONS.verbosity >= 3: + print(f'WARNING: Result "{line}" found outside sum file boundaries.', + file=sys.stderr) + return False + + return valid_result def IsToolLine(line): @@ -354,7 +364,7 @@ def ParseManifestWorker(result_set, manifest_path): result_set.remove(result_set.MakeTestResult(GetNegativeResult(line))) elif IsInclude(line): ParseManifestWorker(result_set, GetIncludeFile(line, manifest_path)) - elif IsInterestingResult(line): + elif IsInterestingResult(result_set, line): result = result_set.MakeTestResult(line) if result.HasExpired(): # Ignore expired manifest entries. @@ -391,7 +401,7 @@ def ParseSummary(sum_fname): ordinal=0 sum_file = open(sum_fname, encoding='latin-1', mode='r') for line in sum_file: - if IsInterestingResult(line): + if IsInterestingResult(result_set, line): result = result_set.MakeTestResult(line, ordinal) ordinal += 1 if result.HasExpired(): |