diff options
author | Cheng Shao <terrorjack@type.dance> | 2023-02-01 13:03:33 +0000 |
---|---|---|
committer | Cheng Shao <terrorjack@type.dance> | 2023-03-30 18:43:53 +0000 |
commit | a984a103ce08faf907d08980fa2e58cacf3aa531 (patch) | |
tree | db378c49a8f8e51e877315cb970d9d0104395aeb | |
parent | f1beee369840b42183d17ab6175fd860f14f869d (diff) | |
download | haskell-a984a103ce08faf907d08980fa2e58cacf3aa531.tar.gz |
testsuite: strip the cross ghc prefix in output and error message
-rw-r--r-- | testsuite/driver/testlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
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: |