[commit: testsuite] master: Fix spurious failure in ghcpkg05 in the nightly build (33f38c1)
Simon Marlow
marlowsd at gmail.com
Tue Jun 28 13:33:36 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/33f38c186f3b9658b881381d650bb363bdb5aca5
>---------------------------------------------------------------
commit 33f38c186f3b9658b881381d650bb363bdb5aca5
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Jun 28 09:55:19 2011 +0100
Fix spurious failure in ghcpkg05 in the nightly build
>---------------------------------------------------------------
driver/testlib.py | 6 +++---
tests/ghc-regress/cabal/all.T | 16 ++++++++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/driver/testlib.py b/driver/testlib.py
index f48b86d..6cd6c33 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -1339,15 +1339,15 @@ def compare_outputs( kind, normaliser, extra_normaliser,
expected_file, actual_file ):
if os.path.exists(expected_file):
expected_raw = read_no_crs(expected_file)
- expected_str = normaliser(expected_raw)
+ expected_str = extra_normaliser(normaliser(expected_raw))
else:
expected_str = ''
expected_file = ''
actual_raw = read_no_crs(actual_file)
- actual_str = normaliser(actual_raw)
+ actual_str = extra_normaliser(normaliser(actual_raw))
- if extra_normaliser(expected_str) != extra_normaliser(actual_str):
+ if expected_str != actual_str:
print 'Actual ' + kind + ' output differs from expected:'
if expected_file == '':
diff --git a/tests/ghc-regress/cabal/all.T b/tests/ghc-regress/cabal/all.T
index ed8b9e2..2ec0fa8 100644
--- a/tests/ghc-regress/cabal/all.T
+++ b/tests/ghc-regress/cabal/all.T
@@ -21,11 +21,19 @@ test('ghcpkg04',
'local04.package.conf.old'])],
run_command,
['$MAKE -s --no-print-directory ghcpkg04'])
+
+# Sometimes we get spurious warnings from ghc-pkg about missing
+# haddock-interfaces; this filters them out.
+def normalise_haddock_junk( str ):
+ return re.sub(r'Warning: haddock.*\n', '', str)
+
test('ghcpkg05',
- extra_clean(['local05a.package.conf',
- 'local05a.package.conf.old',
- 'local05b.package.conf',
- 'local05b.package.conf.old']),
+ [ extra_clean(['local05a.package.conf',
+ 'local05a.package.conf.old',
+ 'local05b.package.conf',
+ 'local05b.package.conf.old']),
+ normalise_fun(normalise_haddock_junk)
+ ],
run_command,
['$MAKE -s --no-print-directory ghcpkg05'])
test('ghcpkg06',
More information about the Cvs-ghc
mailing list