|
|
|
@ -625,7 +625,9 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): |
|
|
|
|
|
|
|
|
|
def run(self, code: 'mesonlib.FileOrString', env: 'Environment', |
|
|
|
|
extra_args: T.Union[T.List[str], T.Callable[[CompileCheckMode], T.List[str]], None] = None, |
|
|
|
|
dependencies: T.Optional[T.List['Dependency']] = None) -> RunResult: |
|
|
|
|
dependencies: T.Optional[T.List['Dependency']] = None, |
|
|
|
|
run_env: T.Optional[T.Dict[str, str]] = None, |
|
|
|
|
run_cwd: T.Optional[str] = None) -> RunResult: |
|
|
|
|
need_exe_wrapper = env.need_exe_wrapper(self.for_machine) |
|
|
|
|
if need_exe_wrapper and self.exe_wrapper is None: |
|
|
|
|
raise CrossNoRunException('Can not run test applications in this cross environment.') |
|
|
|
@ -638,7 +640,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): |
|
|
|
|
else: |
|
|
|
|
cmdlist = [p.output_name] |
|
|
|
|
try: |
|
|
|
|
pe, so, se = mesonlib.Popen_safe(cmdlist) |
|
|
|
|
pe, so, se = mesonlib.Popen_safe(cmdlist, env=run_env, cwd=run_cwd) |
|
|
|
|
except Exception as e: |
|
|
|
|
mlog.debug(f'Could not run: {cmdlist} (error: {e})\n') |
|
|
|
|
return RunResult(False) |
|
|
|
|