Skip to content
Snippets Groups Projects
Commit d8543c4e authored by Matt Kwong's avatar Matt Kwong
Browse files

Fix --measure_cpu_costs flag in run_tests.py on Windows

parent 6bf7782e
No related branches found
No related tags found
No related merge requests found
...@@ -270,8 +270,13 @@ class Job(object): ...@@ -270,8 +270,13 @@ class Job(object):
env = sanitized_environment(env) env = sanitized_environment(env)
self._start = time.time() self._start = time.time()
cmdline = self._spec.cmdline 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 cmdline = ['time', '-p'] + cmdline
else:
measure_cpu_costs = False
try_start = lambda: subprocess.Popen(args=cmdline, try_start = lambda: subprocess.Popen(args=cmdline,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
stdout=self._tempfile, stdout=self._tempfile,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment