aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Nikitin <denik@google.com>2020-10-03 11:45:28 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-04 00:35:06 +0000
commitd184b9af4fb0559b1e98a935c85a1b42a2af37bd (patch)
tree45f507f5afa59527808c162d161daad96b541e2f
parentb9a429906b7815cd9aeca6674f26e6e2e3ba56dd (diff)
downloadtoolchain-utils-d184b9af4fb0559b1e98a935c85a1b42a2af37bd.tar.gz
crosperf: Update path search for chrome sources
Chrome source location has recently changed and path search in crosperf is updated accordingly. BUG=None TEST=run crosperf after repo sync and ebuild prepare of chrome. Change-Id: I715b3a9bf4892a993181b0be5864de94f651afe2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2446895 Commit-Queue: Denis Nikitin <denik@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Auto-Submit: Denis Nikitin <denik@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r--crosperf/label.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/crosperf/label.py b/crosperf/label.py
index b8122613..b14c4a73 100644
--- a/crosperf/label.py
+++ b/crosperf/label.py
@@ -61,9 +61,9 @@ class Label(object):
if self.image_type == 'local':
chromeos_root = FileUtils().ChromeOSRootFromImage(chromeos_image)
if not chromeos_root:
- raise RuntimeError(
- "No ChromeOS root given for label '%s' and could "
- "not determine one from image path: '%s'." % (name, chromeos_image))
+ raise RuntimeError("No ChromeOS root given for label '%s' and could "
+ "not determine one from image path: '%s'." %
+ (name, chromeos_image))
else:
chromeos_root = FileUtils().CanonicalizeChromeOSRoot(chromeos_root)
if not chromeos_root:
@@ -77,6 +77,11 @@ class Label(object):
if not os.path.exists(self.chrome_src):
self.chrome_src = os.path.join(self.chromeos_root,
'.cache/distfiles/target/chrome-src')
+ # Chrome source location has changed and we have to support
+ # old and new path.
+ if not os.path.exists(self.chrome_src):
+ self.chrome_src = os.path.join(self.chromeos_root,
+ '.cache/distfiles/chrome-src-internal')
else:
chromeos_src = misc.CanonicalizePath(chrome_src)
if not chromeos_src: