diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:31 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:31 +0000 |
commit | 7582e3938bb9fb3e4664efdfb2313df29f27b70b (patch) | |
tree | 65bec6df3984fb0b437488fd86eb1359e9c84af4 /utils/libcxx/test/executor.py | |
parent | 733153a0fb52facba02c550ec849f0c734dfa412 (diff) |
Notes
Diffstat (limited to 'utils/libcxx/test/executor.py')
-rw-r--r-- | utils/libcxx/test/executor.py | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/utils/libcxx/test/executor.py b/utils/libcxx/test/executor.py index 4a189174d915..0ccf96caa8ba 100644 --- a/utils/libcxx/test/executor.py +++ b/utils/libcxx/test/executor.py @@ -38,36 +38,11 @@ class LocalExecutor(Executor): def run(self, exe_path, cmd=None, work_dir='.', file_deps=None, env=None): cmd = cmd or [exe_path] - env_cmd = [] - if env: - env_cmd += ['env'] - env_cmd += ['%s=%s' % (k, v) for k, v in env.items()] if work_dir == '.': work_dir = os.getcwd() - if not self.is_windows: - out, err, rc = executeCommand(env_cmd + cmd, cwd=work_dir) - else: - out, err, rc = executeCommand(cmd, cwd=work_dir, - env=self._build_windows_env(env)) - return (env_cmd + cmd, out, err, rc) - - def _build_windows_env(self, exec_env): - # FIXME: Finding Windows DLL's at runtime requires modifying the - # PATH environment variables. However we don't want to print out - # the entire PATH as part of the diagnostic for every failing test. - # Therefore this hack builds a new executable environment that - # merges the current environment and the supplied environment while - # still only printing the supplied environment in diagnostics. - if not self.is_windows or exec_env is None: - return None - new_env = dict(os.environ) - for key, value in exec_env.items(): - if key == 'PATH': - assert value.strip() != '' and "expected non-empty path" - new_env['PATH'] = "%s;%s" % (value, os.environ['PATH']) - else: - new_env[key] = value - return new_env + out, err, rc = executeCommand(cmd, cwd=work_dir, env=env) + return (cmd, out, err, rc) + class PrefixExecutor(Executor): """Prefix an executor with some other command wrapper. |