aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2017-05-17 18:04:58 -0700
committerGravatar Matt Kwong <mattkwong@google.com>2017-05-31 10:40:07 -0700
commitd8543c4e0f4ff827337654e198d41ff5539a2b9e (patch)
treeaf2f06210f9bb7d9cecc7d160c05e1b81ebc2d90 /tools
parent6bf7782ee12925b7baeb722082568999fc98fa7a (diff)
Fix --measure_cpu_costs flag in run_tests.py on Windows
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests/python_utils/jobset.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py
index 3754035308..b4f7557a35 100755
--- a/tools/run_tests/python_utils/jobset.py
+++ b/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,