From bad3765668cc5badf5d0a19100fac95125985473 Mon Sep 17 00:00:00 2001 From: Matthew Pickering <matthewtpickering@gmail.com> Date: Tue, 28 Nov 2023 17:06:38 +0000 Subject: [PATCH] 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. --- testsuite/tests/driver/T21097b/T21097b.stdout | 4 ---- testsuite/tests/driver/T21097b/all.T | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/testsuite/tests/driver/T21097b/T21097b.stdout b/testsuite/tests/driver/T21097b/T21097b.stdout index e0380edd6c40..f4f12d91c8bd 100644 --- a/testsuite/tests/driver/T21097b/T21097b.stdout +++ b/testsuite/tests/driver/T21097b/T21097b.stdout @@ -1,5 +1 @@ - -==================== Module Map ==================== Foo a-0.1 (exposed package) - - diff --git a/testsuite/tests/driver/T21097b/all.T b/testsuite/tests/driver/T21097b/all.T index ee47c0610ee2..f58203358fa6 100644 --- a/testsuite/tests/driver/T21097b/all.T +++ b/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, []) -- GitLab