[commit: ghc] master: Make mod73 test insensitive to minor variations (#9325) (b06e83d)

git at git.haskell.org git at git.haskell.org
Thu Jul 31 02:11:10 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b06e83dee5f7ec32efb4c424b0450a6c55359239/ghc

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

commit b06e83dee5f7ec32efb4c424b0450a6c55359239
Author: Reid Barton <rwbarton at gmail.com>
Date:   Wed Jul 30 21:44:42 2014 -0400

    Make mod73 test insensitive to minor variations (#9325)


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

b06e83dee5f7ec32efb4c424b0450a6c55359239
 testsuite/tests/module/all.T | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index 926cbb5..cb5ce2f 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -91,7 +91,16 @@ test('mod69', normal, compile_fail, [''])
 test('mod70', normal, compile_fail, [''])
 test('mod71', normal, compile_fail, [''])
 test('mod72', normal, compile_fail, [''])
-test('mod73', normal, compile_fail, [''])
+
+# The order of suggestions in the output for test mod73
+# is subject to variation depending on the optimization level
+# that GHC was built with (and probably minor changes to GHC too).
+# This seems okay since there is unsafePerformIO under the hood
+# in FastString. Allow any order with an extra normaliser. (See #9325.)
+def normalise_mod73_error(x):
+    return x.replace('LT','XX',1).replace('EQ','XX',1).replace('GT','XX',1)
+test('mod73', normalise_errmsg_fun(normalise_mod73_error), compile_fail, [''])
+
 test('mod74', normal, compile_fail, [''])
 test('mod75', normal, compile, [''])
 test('mod76', normal, compile_fail, [''])



More information about the ghc-commits mailing list