summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/driver/testlib.py6
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr2
-rw-r--r--testsuite/tests/roles/should_compile/all.T2
3 files changed, 4 insertions, 6 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 9a6951b6e5..e3562f7c54 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 5c144c204d..a01cc05631 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 681092bd48..744b9342a6 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'])