Index: tools/run-tests.py |
diff --git a/tools/run-tests.py b/tools/run-tests.py |
index 84fbfc18883556ce644ec6f2118067bcdfe756f5..e0e44aa5595dbe4e6d241460d1fbe3bb72cd74d5 100755 |
--- a/tools/run-tests.py |
+++ b/tools/run-tests.py |
@@ -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") |
Michael Achenbach
2016/10/18 14:05:37
It is a convention on buildbot that the build prod
|
+ 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: |
Michael Achenbach
2016/10/18 14:05:37
This remains for gyp bots that don't support auto-
|
# 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, |