Fix makedirs error in swarming task when directory already exists.

https://chromium-swarm.appspot.com/task?id=4e80a4186ad0b110
This regression was added with the below change:
https://webrtc-review.googlesource.com/c/src/+/182920

Bug: webrtc:11895
Change-Id: Ic870e2b75e72453acac20e1321a24a8b615c7f58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183448
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32048}
This commit is contained in:
Jeremy Leconte
2020-09-07 13:06:38 +02:00
committed by Commit Bot
parent bddedcbb33
commit 416631f119

View File

@ -24,7 +24,9 @@ def main():
if args.isolated_script_test_perf_output: if args.isolated_script_test_perf_output:
# TODO(bugs.webrtc.org/11895): Move this code somewhere else because # TODO(bugs.webrtc.org/11895): Move this code somewhere else because
# flags_compatibility.py shouldn't create output directories. # flags_compatibility.py shouldn't create output directories.
os.makedirs(os.path.dirname(args.isolated_script_test_perf_output)) output_dirname = os.path.dirname(args.isolated_script_test_perf_output)
if not os.path.exists(output_dirname):
os.makedirs(output_dirname)
test_command += ['--isolated_script_test_perf_output=' + test_command += ['--isolated_script_test_perf_output=' +
args.isolated_script_test_perf_output] args.isolated_script_test_perf_output]
logging.info('Running %r', test_command) logging.info('Running %r', test_command)