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-06-11 20:07:25 -0400
commit175d49e6c8ae1cfff0b8836a4a067d256a5a23e8 (patch)
treec62f80ed06f6bf3b0d06d79929b86fc4aa0d14ec
parent983ada70a013c7642a751f6e41587ff95b57d0f8 (diff)
downloadhaskell-175d49e6c8ae1cfff0b8836a4a067d256a5a23e8.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. (cherry picked from commit 4ca271d1880a6f4c5f49869de7f1920a2073adb6)
-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 4a87f0a117..efe26bf1bb 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -225,6 +225,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=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=bug, ways=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 )