diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index e47fc1c1ab70091498b31ce0de873fd30fd7ddac..409d4fe81f278b4060885c68c4e2befd0a6a79d8 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -330,6 +330,12 @@ def _cmd_prefix( opts, prefix ): def normalise_slashes( opts ): opts.extra_normaliser = normalise_slashes_ +def normalise_fun( fun ): + return lambda opts, f=fun: _normalise_fun(opts, f) + +def _normalise_fun( opts, f ): + opts.extra_normaliser = f + # ---- # Function for composing two opt-fns together @@ -1181,6 +1187,9 @@ def normalise_errmsg( str ): # hacky solution is used in place of more sophisticated filename # mangling str = re.sub('([^\\s])\\.exe', '\\1', str) + # The inplace ghc's are called ghc-bin-stage[123] to avoid filename + # collisions, so we need to normalise that to just "ghc" + str = re.sub('ghc-bin-stage[123]', 'ghc', str) return str def normalise_slashes_( str ): diff --git a/testsuite/tests/ghc-regress/driver/all.T b/testsuite/tests/ghc-regress/driver/all.T index 989616f4959c680a3a7b4670d4d02581eaa55734..253239c0f8711ba9eb3fcd84c5f452aa7e5c1b44 100644 --- a/testsuite/tests/ghc-regress/driver/all.T +++ b/testsuite/tests/ghc-regress/driver/all.T @@ -192,7 +192,9 @@ test('driver200', normal, run_command, ['$MAKE -s --no-print-directory test200']) cleanall() -test('2566', normal, run_command, +test('2566', + normalise_fun(normalise_errmsg), + run_command, ['$MAKE -s --no-print-directory 2566']) cleanall()