summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/backends.py2
-rw-r--r--test cases/failing/126 generator host binary/test.json5
-rw-r--r--unittests/linuxcrosstests.py2
3 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 970fb82f2..d5bda3b42 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -574,7 +574,7 @@ class Backend:
is_cross_built = not self.environment.machines.matches_build_machine(exe_for_machine)
if is_cross_built and self.environment.need_exe_wrapper():
if not self.environment.has_exe_wrapper():
- msg = 'An exe_wrapper is needed but was not found. Please define one ' \
+ msg = 'An exe_wrapper is needed for ' + exe_cmd[0] + ' but was not found. Please define one ' \
'in cross file and check the command and/or add it to PATH.'
raise MesonException(msg)
exe_wrapper = self.environment.get_exe_wrapper()
diff --git a/test cases/failing/126 generator host binary/test.json b/test cases/failing/126 generator host binary/test.json
index 7e354d60d..c633622cf 100644
--- a/test cases/failing/126 generator host binary/test.json
+++ b/test cases/failing/126 generator host binary/test.json
@@ -1,5 +1,8 @@
{
"stdout": [
- { "line": "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." }
+ {
+ "match": "re",
+ "line": "ERROR: An exe_wrapper is needed for .* but was not found. Please define one in cross file and check the command and/or add it to PATH."
+ }
]
}
diff --git a/unittests/linuxcrosstests.py b/unittests/linuxcrosstests.py
index a35633cdd..910429b0e 100644
--- a/unittests/linuxcrosstests.py
+++ b/unittests/linuxcrosstests.py
@@ -146,7 +146,7 @@ class LinuxCrossMingwTests(BaseLinuxCrossTests):
self.meson_cross_files = [os.path.join(testdir, 'broken-cross.txt')]
# Force tracebacks so we can detect them properly
env = {'MESON_FORCE_BACKTRACE': '1'}
- error_message = "An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH."
+ error_message = "An exe_wrapper is needed for " + self.builddir + "/prog.exe but was not found. Please define one in cross file and check the command and/or add it to PATH."
with self.assertRaises(MesonException) as cm:
# Must run in-process or we'll get a generic CalledProcessError