[commit: ghc] master: testsuite: normalise integer library name for T8958 (985e367)

git at git.haskell.org git at git.haskell.org
Sat Aug 30 07:32:52 UTC 2014


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

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

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

commit 985e367948a33a4a50629ea9d2523317f2311a3b
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Fri Aug 29 19:06:14 2014 +0300

    testsuite: normalise integer library name for T8958
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>


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

985e367948a33a4a50629ea9d2523317f2311a3b
 testsuite/driver/testlib.py                       | 6 ++----
 testsuite/tests/roles/should_compile/T8958.stderr | 2 +-
 testsuite/tests/roles/should_compile/all.T        | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 9a6951b..e3562f7 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1596,10 +1596,8 @@ def normalise_errmsg( str ):
     # The inplace ghc's are called ghc-stage[123] to avoid filename
     # collisions, so we need to normalise that to just "ghc"
     str = re.sub('ghc-stage[123]', 'ghc', str)
-    # We sometimes see the name of the integer-gmp package on stderr,
-    # but this can change (either the implementation name or the
-    # version number), so we canonicalise it here
-    str = re.sub('integer-[a-z]+', 'integer-impl', str)
+    # Error messages simetimes contain integer implementation package
+    str = re.sub('integer-(gmp|simple)-[0-9.]+', 'integer-<IMPL>-<VERSION>', str)
     return str
 
 # normalise a .prof file, so that we can reasonably compare it against
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index 5c144c2..a01cc05 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -17,7 +17,7 @@ INSTANCES
     -- Defined at T8958.hs:10:10
 Dependent modules: []
 Dependent packages: [base-4.7.1.0, ghc-prim-0.3.1.0,
-                     integer-gmp-0.5.1.0]
+                     integer-<IMPL>-<VERSION>]
 
 ==================== Typechecker ====================
 AbsBinds [a] []
diff --git a/testsuite/tests/roles/should_compile/all.T b/testsuite/tests/roles/should_compile/all.T
index 681092b..744b934 100644
--- a/testsuite/tests/roles/should_compile/all.T
+++ b/testsuite/tests/roles/should_compile/all.T
@@ -5,4 +5,4 @@ test('Roles4', only_ways('normal'), compile, ['-ddump-tc'])
 test('Roles13', only_ways('normal'), compile, ['-ddump-simpl -dsuppress-uniques'])
 test('Roles14', only_ways('normal'), compile, ['-ddump-tc'])
 test('RolesIArray', only_ways('normal'), compile, [''])
-test('T8958', only_ways('normal'), compile, ['-ddump-tc -dsuppress-uniques'])
+test('T8958', [normalise_fun(normalise_errmsg), only_ways('normal')], compile, ['-ddump-tc -dsuppress-uniques'])



More information about the ghc-commits mailing list