[commit: ghc] master: Testsuite Windows: fix T8172 (#8172) (da84fd5)

git at git.haskell.org git at git.haskell.org
Thu Jun 11 17:29:55 UTC 2015


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

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

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

commit da84fd5475d189c39bd3e12d29f45618c92ed800
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu Jun 11 19:26:11 2015 +0200

    Testsuite Windows: fix T8172 (#8172)
    
    Use the new function `normalise_drive_letter` to change D:\ to C:\
    before comparing outputs.


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

da84fd5475d189c39bd3e12d29f45618c92ed800
 testsuite/driver/testlib.py        | 4 ++++
 testsuite/tests/ghci/scripts/all.T | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index db3ada4..671db9a 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -517,6 +517,10 @@ def normalise_version( *pkgs ):
         _normalise_errmsg_fun(name, opts, normalise_version_(*pkgs))
     return normalise_version__
 
+def normalise_drive_letter(name, opts):
+    # Windows only. Change D:\\ to C:\\.
+    _normalise_fun(name, opts, lambda str: re.sub(r'[A-Z]:\\', r'C:\\', str))
+
 def join_normalisers(*a):
     """
     Compose functions, flattening sequences.
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index f0d7c19..8d7b5de 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -168,7 +168,8 @@ test('T7939', normal, ghci_script, ['T7939.script'])
 test('T7894', normal, ghci_script, ['T7894.script'])
 test('T8116', normal, ghci_script, ['T8116.script'])
 test('T8113', normal, ghci_script, ['T8113.script'])
-test('T8172', normal, ghci_script, ['T8172.script'])
+test('T8172', when(opsys('mingw32'), normalise_drive_letter),
+     ghci_script, ['T8172.script'])
 test('T8215', normal, ghci_script, ['T8215.script'])
 test('T8357', normal, ghci_script, ['T8357.script'])
 test('T8383', normal, ghci_script, ['T8383.script'])



More information about the ghc-commits mailing list