Commit bf3adea5 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Add fallback to legacy output directory

The infrastructure will soon start using the canonical build output
location out/build. New flake bisect jobs will then be started with
--outdir=out/build.

This change picks the current out/Release or out/Debug as an
alternative output location to be compatible with the future value
of the flag.

This code will be removed when the property change happens.

This prepares:
https://crrev.com/c/2426643

Bug: chromium:1132088
Change-Id: I1fe3bcb239b05d069a1006646bc9306a16a3cecd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440336Reviewed-by: 's avatarLiviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70228}
parent 919d1dd7
...@@ -474,6 +474,20 @@ class BaseTestRunner(object): ...@@ -474,6 +474,20 @@ class BaseTestRunner(object):
return return
yield options.outdir yield options.outdir
# TODO(machenbach): Temporary fallback to legacy outdir. The
# infrastructure switches to the canonical out/build location. But
# bisection will keep working with out/Release or out/Debug for a
# grace period.
if os.path.basename(options.outdir) == 'build':
base_dir = os.path.dirname(options.outdir)
release_dir = os.path.join(base_dir, 'Release')
debug_dir = os.path.join(base_dir, 'Debug')
if os.path.exists(release_dir) and not os.path.exists(debug_dir):
yield release_dir
if os.path.exists(debug_dir) and not os.path.exists(release_dir):
yield debug_dir
if options.arch and options.mode: if options.arch and options.mode:
yield os.path.join(options.outdir, yield os.path.join(options.outdir,
'%s.%s' % (options.arch, options.mode)) '%s.%s' % (options.arch, options.mode))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment