summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-02-26 10:13:44 -0500
committerBen Gamari <ben@smart-cactus.org>2019-02-26 15:37:52 -0500
commit2a8bd85974941fbff951ab43564fe787a0c6019e (patch)
tree639c48e4892649b3b539c88486476da81b6bf4c0
parent14586f5d737ec5dc828633267b50dcf0d47e1696 (diff)
downloadhaskell-2a8bd85974941fbff951ab43564fe787a0c6019e.tar.gz
testsuite: Introduce fragile modifier
Now since we have been a bit more stringent in testsuite cleanliness we have been marking a lot of tests as fragile using the `skip` modifier. However, this unfortunately means that we lose the association with the ticket number documenting the fragility. Here we introduce `fragile` and `fragile_for` to retain this information.
-rw-r--r--testsuite/driver/testlib.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index edd43fba9d..acf4b4ed9c 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -247,6 +247,30 @@ def _expect_pass(way):
# -----
+def fragile( bug ):
+ """
+ Indicates that the test should be skipped due to fragility documented in
+ the given ticket.
+ """
+ def helper( name, opts, bug ):
+ record_broken(name, opts, bug)
+ opts.skip = True
+
+ return helper
+
+def fragile_for( name, opts, bug, ways ):
+ """
+ Indicates that the test should be skipped due to fragility in the given
+ test ways as documented in the given ticket.
+ """
+ def helper( name, opts, bug, ways ):
+ record_broken(name, opts, bug)
+ opts.omit_ways = ways
+
+ return helper
+
+# -----
+
def omit_ways( ways ):
return lambda name, opts, w=ways: _omit_ways( name, opts, w )