diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-07-08 20:57:09 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-07-09 04:09:46 +0530 |
commit | 416a00308f5b0f228af3c93eb597eca8529fdbb0 (patch) | |
tree | 39e2576abdb4b6e79fa96d488e4413dc3af652dd /mesonbuild/mtest.py | |
parent | 2093d45a4e1203d868d200628918472877c7ec31 (diff) | |
download | meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.zip meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.gz meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.bz2 |
cross: Use ExternalProgram for cross-file exe_wrapper
We already have code to fetch and find binaries specified in a cross
file, so use the same code for exe_wrapper. This allows us to handle
the same corner-cases that were fixed for other cross binaries.
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r-- | mesonbuild/mtest.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 855154f..3c4073b 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -241,6 +241,7 @@ class SingleTestRunner: return None else: return [self.test.exe_runner] + self.test.fname + return self.test.exe_runner.get_command() + self.test.fname else: return self.test.fname @@ -257,19 +258,12 @@ class SingleTestRunner: self.test.timeout = None return self._run_cmd(wrap + cmd + self.test.cmd_args + self.options.test_args) - @staticmethod - def _substring_in_list(substr, strlist): - for s in strlist: - if substr in s: - return True - return False - def _run_cmd(self, cmd): starttime = time.time() if len(self.test.extra_paths) > 0: self.env['PATH'] = os.pathsep.join(self.test.extra_paths + ['']) + self.env['PATH'] - if self._substring_in_list('wine', cmd): + if mesonlib.substring_is_in_list('wine', cmd): wine_paths = ['Z:' + p for p in self.test.extra_paths] wine_path = ';'.join(wine_paths) # Don't accidentally end with an `;` because that will add the |