[commit: ghc] wip/fix-integer-simple-ci: testsuite: Mark arith011 as broken with integer-simple (094fb42)

git at git.haskell.org git at git.haskell.org
Thu Dec 27 17:00:21 UTC 2018


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

On branch  : wip/fix-integer-simple-ci
Link       : http://ghc.haskell.org/trac/ghc/changeset/094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec/ghc

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

commit 094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Dec 23 12:18:57 2018 -0500

    testsuite: Mark arith011 as broken with integer-simple
    
    As noted in #16091, arith011 fails when run against integer-simple with a
    "divide by zero" exception. This suggests that integer-gmp and integer-simple
    are handling division by zero differently.


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

094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec
 testsuite/driver/testlib.py              | 7 ++++++-
 testsuite/tests/numeric/should_run/all.T | 4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index f26f9e0..b04ecf3 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -460,8 +460,13 @@ def have_gdb( ):
 def have_readelf( ):
     return config.have_readelf
 
+def using_integer_backend(backend):
+    """ A predicate to test which integer backend we are using. """
+    assert backend in ["integer-gmp", "integer-simple"]
+    return config.integer_backend == backend
+
 # Many tests sadly break with integer-simple due to GHCi's ignorance of it.
-broken_without_gmp = when(config.integer_backend != "integer-gmp",
+broken_without_gmp = when(not(using_integer_backend("integer-gmp")),
                           expect_broken(16043))
 
 # ---
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index 295e818..ab05048 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -20,7 +20,9 @@ test('arith008', normal, compile_and_run, [opts])
 
 test('arith009', normal, compile_and_run, [''])
 test('arith010', normal, compile_and_run, [''])
-test('arith011', normal, compile_and_run, [''])
+test('arith011',
+     when(using_integer_backend("integer-simple"), expect_broken(16091)),
+     compile_and_run, [''])
 
 test('arith012', normal, compile_and_run, [opts])
 



More information about the ghc-commits mailing list