[Git][ghc/ghc][master] testsuite: Fix T21097b test with make 4.1 (deb9)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sun Dec 3 05:11:29 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
bad37656 by Matthew Pickering at 2023-12-03T00:10:46-05:00
testsuite: Fix T21097b test with make 4.1 (deb9)

cee81370cd6ef256f66035e3116878d4cb82e28b recently added a test which
failed on deb9 because the version of make was emitting the recipe
failure to stdout rather than stderr.

One way to fix this is to be more precise in the test about which part
of the output we care about inspecting.

- - - - -


2 changed files:

- testsuite/tests/driver/T21097b/T21097b.stdout
- testsuite/tests/driver/T21097b/all.T


Changes:

=====================================
testsuite/tests/driver/T21097b/T21097b.stdout
=====================================
@@ -1,5 +1 @@
-
-==================== Module Map ====================
 Foo                                               a-0.1 (exposed package)
-
-


=====================================
testsuite/tests/driver/T21097b/all.T
=====================================
@@ -1,6 +1,15 @@
+def normalise_t21097b_output(s):
+  res = ""
+  for l in s.splitlines():
+    if 'Foo' in l:
+      res += l
+      res += "\n"
+  return res
+
 # Package b is unusable (broken dependency) and reexport Foo from a (which is usable)
 test('T21097b',
   [ extra_files(["pkgdb", "pkgdb/a.conf", "pkgdb/b.conf", "Test.hs"])
   , ignore_stderr
+  , normalise_fun(normalise_t21097b_output)
   , exit_code(2)
   ], makefile_test, [])



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bad3765668cc5badf5d0a19100fac95125985473
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/20231203/97970a29/attachment-0001.html>


More information about the ghc-commits mailing list