Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: build/android/pylib/constants/__init__.py

Issue 1799073004: 🚄 test_runner.py: Auto-detect output dir when running on bots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/constants/__init__.py
diff --git a/build/android/pylib/constants/__init__.py b/build/android/pylib/constants/__init__.py
index 21001f9ccf22734842965c1132b9310747dd1bd4..f1844df3dd07f6b8063028d1c832fa9087687f2a 100644
--- a/build/android/pylib/constants/__init__.py
+++ b/build/android/pylib/constants/__init__.py
@@ -9,6 +9,7 @@
# pylint: disable=W0212
import collections
+import glob
import logging
import os
import subprocess
@@ -260,6 +261,15 @@ def CheckOutputDirectory():
if os.path.exists('build.ninja'):
output_dir = os.getcwd()
SetOutputDirectory(output_dir)
+ elif os.environ.get('CHROME_HEADLESS'):
+ # When running on bots, see if the output directory is obvious.
+ dirs = glob.glob(os.path.join(DIR_SOURCE_ROOT, 'out', '*', 'build.ninja'))
jbudorick 2016/03/14 17:41:35 I don't think this will work with gyp bots, which
+ if len(dirs) == 1:
+ SetOutputDirectory(dirs[0])
+ else:
+ raise Exception('Neither CHROMIUM_OUTPUT_DIR nor CHROMIUM_OUT_DIR '
+ 'has been set. CHROME_HEADLESS detected, but multiple '
+ 'out dirs exist: %r' % dirs)
else:
raise Exception('Neither CHROMIUM_OUTPUT_DIR nor CHROMIUM_OUT_DIR '
'has been set')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698