[Git][ghc/ghc][wip/js-staging] Testsuite: better normalisation for ghc and ghc-pkg

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Mon Sep 26 21:20:15 UTC 2022



Sylvain Henry pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
3de68f56 by Sylvain Henry at 2022-09-26T23:22:19+02:00
Testsuite: better normalisation for ghc and ghc-pkg

Allow normalisation for ghc and ghc-pkg anywhere in the output, not just
at the beginning of the line.

Fix T1750 and ghcpkg05 for example

- - - - -


1 changed file:

- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -2313,8 +2313,9 @@ def normalise_errmsg(s: str) -> str:
     # The inplace ghc's are called ghc-stage[123] to avoid filename
     # collisions, so we need to normalise that to just "ghc"
     s = re.sub('ghc-stage[123]', 'ghc', s)
-    # Remove platform prefix (e.g. js-unknown-ghcjs) for cross-compiled ghc
-    s = re.sub('^\\w+-\\w+-\\w+-ghc', 'ghc', s)
+    # Remove platform prefix (e.g. js-unknown-ghcjs) for cross-compiled tools
+    # (ghc, ghc-pkg, unlit, etc.)
+    s = re.sub('\\w+-\\w+-\\w+-ghc', 'ghc', s)
     s = re.sub('\\w+-\\w+-\\w+-unlit', 'unlit', s)
 
     # On windows error messages can mention versioned executables



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3de68f562f3e7cc05903f7652ff28b37bc6739ce

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3de68f562f3e7cc05903f7652ff28b37bc6739ce
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220926/99d5b043/attachment-0001.html>


More information about the ghc-commits mailing list