summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-10 19:55:42 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-10 19:55:42 +0000
commit7b08184d46113e5b8e1c8ee250a57cf53c816e13 (patch)
treeda934d3074f3b814e3e0a6984b57e5cb38f3d352
parenta38c049fc5c7db8e48c5f57122f62a8d62ea467b (diff)
downloadbcm5719-llvm-7b08184d46113e5b8e1c8ee250a57cf53c816e13.tar.gz
bcm5719-llvm-7b08184d46113e5b8e1c8ee250a57cf53c816e13.zip
Clean up LIT failure output by not showing the entire environment
llvm-svn: 302713
-rw-r--r--libcxx/utils/libcxx/test/executor.py31
1 files changed, 3 insertions, 28 deletions
diff --git a/libcxx/utils/libcxx/test/executor.py b/libcxx/utils/libcxx/test/executor.py
index 4a189174d91..0ccf96caa8b 100644
--- a/libcxx/utils/libcxx/test/executor.py
+++ b/libcxx/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.
OpenPOWER on IntegriCloud