From 3e606230e904482f900a43a25aa4584567f25d87 Mon Sep 17 00:00:00 2001
From: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
Date: Wed, 15 Nov 2023 16:58:27 +0100
Subject: [PATCH] Fix IPE test

A helper function was defined in a different module than used.
To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe
---
 testsuite/tests/rts/all.T     | 4 ----
 testsuite/tests/rts/ipe/all.T | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index eb0f0b81d1..cc0995b5b3 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -216,10 +216,6 @@ test('EventlogOutput_IPE',
      ],
      makefile_test, ['EventlogOutput_IPE'])
 
-# Remove the capability prefix from IPE event log lines.
-def noCapabilityOutputFilter(s):
-     return re.sub(r'[a-f0-9]+: IPE:', 'IPE:', s)
-
 test('T4059', req_c, makefile_test, ['T4059'])
 
 # Test for #4274
diff --git a/testsuite/tests/rts/ipe/all.T b/testsuite/tests/rts/ipe/all.T
index acb7e1f3b9..57a6cadc93 100644
--- a/testsuite/tests/rts/ipe/all.T
+++ b/testsuite/tests/rts/ipe/all.T
@@ -1,3 +1,7 @@
+# Remove the capability prefix from IPE event log lines.
+def noCapabilityOutputFilter(s):
+     return re.sub(r'[a-f0-9]+: IPE:', 'IPE:', s)
+
 test('ipeMap', [extra_files(['ipe_lib.c', 'ipe_lib.h']), c_src, omit_ghci], compile_and_run, ['ipe_lib.c'])
 
 # Manually create IPE entries and dump them to event log (stderr).
