]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[contrib] validate_failures.py: Support expiry attributes in manifests
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Wed, 12 Apr 2023 14:35:39 +0000 (14:35 +0000)
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Wed, 14 Jun 2023 14:29:46 +0000 (14:29 +0000)
contrib/ChangeLog:

* testsuite-management/validate_failures.py (ParseManifestWorker):
Support expiry attributes in manifests.
(ParseSummary): Add a comment.

contrib/testsuite-management/validate_failures.py

index 94ba2e58b51f373c9e0560957512a5066db692ce..7351ba120b7302ac23680d1d90b317a3cdddb120 100755 (executable)
@@ -338,7 +338,13 @@ def ParseManifestWorker(result_set, manifest_path):
     elif IsInclude(line):
       ParseManifestWorker(result_set, GetIncludeFile(line, manifest_path))
     elif IsInterestingResult(line):
-      result_set.add(result_set.MakeTestResult(line))
+      result = result_set.MakeTestResult(line)
+      if result.HasExpired():
+        # Ignore expired manifest entries.
+        if _OPTIONS.verbosity >= 4:
+          print('WARNING: Expected failure "%s" has expired.' % line.strip())
+        continue
+      result_set.add(result)
     elif IsExpLine(orig_line):
       result_set.current_exp = _EXP_LINE_REX.match(orig_line).groups()[0]
     elif IsToolLine(orig_line):
@@ -369,6 +375,8 @@ def ParseSummary(sum_fname):
       result = result_set.MakeTestResult(line, ordinal)
       ordinal += 1
       if result.HasExpired():
+        # ??? What is the use-case for this?  How "expiry" annotations are
+        # ??? supposed to be added to .sum results?
         # Tests that have expired are not added to the set of expected
         # results. If they are still present in the set of actual results,
         # they will cause an error to be reported.