From a984a103ce08faf907d08980fa2e58cacf3aa531 Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Wed, 1 Feb 2023 13:03:33 +0000 Subject: testsuite: strip the cross ghc prefix in output and error message --- testsuite/driver/testlib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 0a5f4a5933..62be228ca9 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -2429,6 +2429,9 @@ def normalise_errmsg(s: str) -> str: # clang may warn about unused argument when used as assembler s = re.sub('.*warning: argument unused during compilation:.*\n', '', s) + # strip the cross prefix if any + s = re.sub('^([^:]+-)?ghc:', 'ghc:', s) + return s # normalise a .prof file, so that we can reasonably compare it against @@ -2521,6 +2524,9 @@ def normalise_output( s: str ) -> str: # clang may warn about unused argument when used as assembler s = re.sub('.*warning: argument unused during compilation:.*\n', '', s) + # strip the cross prefix if any + s = re.sub('^([^:]+-)?ghc:', 'ghc:', s) + return s def normalise_asm( s: str ) -> str: -- cgit v1.2.1