diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-10-01 11:19:08 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-05-18 13:53:58 -0700 |
commit | 0ec94ca0629415d4b555e8ef38a5093a65e0539e (patch) | |
tree | d8bb83c50d30eaa5f70931018f7458210a1c4489 /mesonbuild/mtest.py | |
parent | cb6662b57299c3644719593115b2ffb828679c36 (diff) | |
download | meson-0ec94ca0629415d4b555e8ef38a5093a65e0539e.zip meson-0ec94ca0629415d4b555e8ef38a5093a65e0539e.tar.gz meson-0ec94ca0629415d4b555e8ef38a5093a65e0539e.tar.bz2 |
backends: Consider arguments passed to a test when cross compiling
Otherwise a wrapper script which takes an executable as an argument will
mistakenly run when that executable is cross compiled. This does not
wrap said executable in an exe_wrapper, just skip it.
Fixes #5982
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r-- | mesonbuild/mtest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index e04d365..8806932 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -615,14 +615,15 @@ class SingleTestRunner: # Can not run test on cross compiled executable # because there is no execute wrapper. return None - else: + elif self.test.cmd_is_built: + # If the command is not built (ie, its a python script), + # then we don't check for the exe-wrapper if not self.test.exe_runner.found(): msg = 'The exe_wrapper defined in the cross file {!r} was not ' \ 'found. Please check the command and/or add it to PATH.' raise TestException(msg.format(self.test.exe_runner.name)) return self.test.exe_runner.get_command() + self.test.fname - else: - return self.test.fname + return self.test.fname def run(self) -> TestRun: cmd = self._get_cmd() |