[commit: ghc] wip/fix-i386: testsuite: Introduce fragile modifier (2a8bd85)

git at git.haskell.org git at git.haskell.org
Wed Feb 27 01:14:04 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/fix-i386
Link       : http://ghc.haskell.org/trac/ghc/changeset/2a8bd85974941fbff951ab43564fe787a0c6019e/ghc

>---------------------------------------------------------------

commit 2a8bd85974941fbff951ab43564fe787a0c6019e
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Feb 26 10:13:44 2019 -0500

    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.


>---------------------------------------------------------------

2a8bd85974941fbff951ab43564fe787a0c6019e
 testsuite/driver/testlib.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index edd43fb..acf4b4e 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 )
 



More information about the ghc-commits mailing list