Fix --measure_cpu_costs flag in run_tests.py on Windows

pull/11348/head
Matt Kwong 8 years ago
parent 6bf7782ee1
commit d8543c4e0f
  1. 7
      tools/run_tests/python_utils/jobset.py

@ -270,8 +270,13 @@ class Job(object):
env = sanitized_environment(env)
self._start = time.time()
cmdline = self._spec.cmdline
if measure_cpu_costs:
# The Unix time command is finicky when used with MSBuild, so we don't use it
# with jobs that run MSBuild.
global measure_cpu_costs
if measure_cpu_costs and not 'vsprojects\\build' in cmdline[0]:
cmdline = ['time', '-p'] + cmdline
else:
measure_cpu_costs = False
try_start = lambda: subprocess.Popen(args=cmdline,
stderr=subprocess.STDOUT,
stdout=self._tempfile,

Loading…
Cancel
Save