[commit: ghc] master: testsuite: normalise away `ld`-warning on AIX (34af60c)

git at git.haskell.org git at git.haskell.org
Tue Dec 29 23:08:57 UTC 2015


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

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

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

commit 34af60c718734625d7f5abbebb3d520ecba36afa
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Dec 28 23:18:33 2015 +0100

    testsuite: normalise away `ld`-warning on AIX
    
    On AIX, `ld` doesn't support `-x` and ignores it. However, a warning is
    emitted to stderr which ends up triggering false positives in some of
    GHC's testsuite tests. So we simply filter out that noise as part of
    normalising stderr.


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

34af60c718734625d7f5abbebb3d520ecba36afa
 testsuite/driver/testlib.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 6b2220f..2ac9018 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1704,6 +1704,10 @@ def normalise_type_reps(str):
     return re.sub(tyCon_re, 'TyCon FINGERPRINT FINGERPRINT ', str)
 
 def normalise_errmsg( str ):
+    """Normalise error-messages emitted via stderr"""
+    # IBM AIX's `ld` is a bit chatty
+    if opsys('aix'):
+        str = str.replace('ld: 0706-027 The -x flag is ignored.\n', '')
     # remove " error:" and lower-case " Warning:" to make patch for
     # trac issue #10021 smaller
     str = modify_lines(str, lambda l: re.sub(' error:', '', l))



More information about the ghc-commits mailing list