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

Unified Diff: scripts/slave/goma_utils.py

Issue 2245553002: Inherit appropiate environment variables in goma module for goma_utils.py (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: use GLOG_log_dir for the location of INFO files Created 4 years, 4 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 | scripts/slave/recipe_modules/goma/api.py » ('j') | scripts/slave/recipe_modules/goma/api.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/goma_utils.py
diff --git a/scripts/slave/goma_utils.py b/scripts/slave/goma_utils.py
index 1485300d2419c98feea00853759c1d97ec89cc95..b232c2f31aa12d1c752d099161b68b67caaf2291 100644
--- a/scripts/slave/goma_utils.py
+++ b/scripts/slave/goma_utils.py
@@ -60,12 +60,17 @@ def GetLatestGlogInfoFile(pattern):
Returns:
the latest glog INFO filename in fullpath.
"""
- dirname = GetGomaTmpDirectory()
- info_pattern = os.path.join(dirname, '%s.*.INFO.*' % pattern)
- candidates = glob.glob(info_pattern)
- if not candidates:
- return None
- return sorted(candidates, reverse=True)[0]
+ for dirname in [os.environ.get('GLOG_log_dir'),
+ GetGomaTmpDirectory()]:
+ if not dirname:
+ continue
+ info_pattern = os.path.join(dirname, '%s.*.INFO.*' % pattern)
+ candidates = glob.glob(info_pattern)
+ if not candidates:
+ continue
+ return sorted(candidates, reverse=True)[0]
+
+ return None
def GetLatestGomaCompilerProxyInfo():
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/goma/api.py » ('j') | scripts/slave/recipe_modules/goma/api.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698