Commit 9acec9f0 authored by machenbach's avatar machenbach Committed by Commit bot

[test] Correctly deduce test-driver arguments on bots using GN

This makes auto-detect-build-configs work on bots (i.e.
if --buildbot was passed).

BUG=v8:5533
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux64_msan_rel,v8_linux64_tsan_rel,v8_linux_arm64_dbg,v8_linux_gc_stress_dbg,v8_linux_noi18n_rel_ng,v8_linux_nosnap_rel

Review-Url: https://chromiumcodereview.appspot.com/2431653002
Cr-Commit-Position: refs/heads/master@{#40424}
parent 194c43a1
......@@ -452,8 +452,13 @@ def ProcessOptions(options):
print(">>> Latest GN build found is %s" % latest_config)
options.outdir = os.path.join(DEFAULT_OUT_GN, latest_config)
build_config_path = os.path.join(
BASE_DIR, options.outdir, "v8_build_config.json")
if options.buildbot:
build_config_path = os.path.join(
BASE_DIR, options.outdir, options.mode, "v8_build_config.json")
else:
build_config_path = os.path.join(
BASE_DIR, options.outdir, "v8_build_config.json")
if os.path.exists(build_config_path):
try:
with open(build_config_path) as f:
......@@ -464,6 +469,10 @@ def ProcessOptions(options):
return False
options.auto_detect = True
# In auto-detect mode the outdir is always where we found the build config.
# This ensures that we'll also take the build products from there.
options.outdir = os.path.dirname(build_config_path)
options.arch_and_mode = None
options.arch = build_config["v8_target_cpu"]
if options.arch == 'x86':
......@@ -711,15 +720,15 @@ def Execute(arch, mode, args, options, suites):
shell_dir = options.shell_dir
if not shell_dir:
if options.buildbot:
if options.auto_detect:
# If an output dir with a build was passed, test directly in that
# directory.
shell_dir = os.path.join(BASE_DIR, options.outdir)
elif options.buildbot:
# TODO(machenbach): Get rid of different output folder location on
# buildbot. Currently this is capitalized Release and Debug.
shell_dir = os.path.join(BASE_DIR, options.outdir, mode)
mode = BuildbotToV8Mode(mode)
elif options.auto_detect:
# If an output dir with a build was passed, test directly in that
# directory.
shell_dir = os.path.join(BASE_DIR, options.outdir)
else:
shell_dir = os.path.join(
BASE_DIR,
......
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