diff options
author | Yuchen Zeng <zyc@google.com> | 2016-07-11 15:31:19 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-07-11 15:31:19 -0700 |
commit | 9710106b5c494965c6efbb5b92eeb5c1fcf6a90a (patch) | |
tree | 50e0c34caeffc9cb5a283afac246cba41068929b /tools/run_tests/jobset.py | |
parent | f0ec5b673cc525502bec1c945d514b7f021d799c (diff) | |
parent | 20b1d58b0c4d44abc04af6c6467b7b217fe54915 (diff) |
Merge remote-tracking branch 'upstream/master' into fix_mac_build
Diffstat (limited to 'tools/run_tests/jobset.py')
-rwxr-xr-x | tools/run_tests/jobset.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 4fe77487f9..3999537c40 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -47,6 +47,12 @@ measure_cpu_costs = False _DEFAULT_MAX_JOBS = 16 * multiprocessing.cpu_count() _MAX_RESULT_SIZE = 8192 +def sanitized_environment(env): + sanitized = {} + for key, value in env.items(): + sanitized[str(key).encode()] = str(value).encode() + return sanitized + def platform_string(): if platform.system() == 'Windows': return 'windows' @@ -219,6 +225,7 @@ class Job(object): env = dict(os.environ) env.update(self._spec.environ) env.update(self._add_env) + env = sanitized_environment(env) self._start = time.time() cmdline = self._spec.cmdline if measure_cpu_costs: |