summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-25 13:45:32 -0400
committerBen Gamari <ben@smart-cactus.org>2022-04-06 15:18:26 -0400
commit39371aa4ca144541e60c09f85a1ddb2769443d1a (patch)
tree04a4ce6ebf5754764de91d46c7cd118c97872fbf
parent9a248afaa9196e6a267605893ab44e0abd562499 (diff)
downloadhaskell-39371aa4ca144541e60c09f85a1ddb2769443d1a.tar.gz
testsuite/driver: Treat framework failures of fragile tests as non-fatal
Previously we would report framework failures of tests marked as fragile as failures. Now we rather treat them as fragile test failures, which are not fatal to the testsuite run. Noticed while investigating #21293.
-rw-r--r--testsuite/driver/testlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 7ee179b837..9c9a1760a2 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1303,7 +1303,9 @@ def framework_fail(name: Optional[TestName], way: Optional[WayName], reason: str
if_verbose(1, '*** framework failure for %s %s ' % (full_name, reason))
name2 = name if name is not None else TestName('none')
way2 = way if way is not None else WayName('none')
- t.framework_failures.append(TestResult(directory, name2, reason, way2))
+ if way not in opts.fragile_ways:
+ # If the test is fragile then we rather report this as a fragile test failure
+ t.framework_failures.append(TestResult(directory, name2, reason, way2))
def framework_warn(name: TestName, way: WayName, reason: str) -> None:
opts = getTestOpts()