Commit 306be5bf authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Fix path for old Chromium snapshots

Chromium snapshots before revision 579575 are still archived using
the old directory name.

TBR=crouleau@chromium.org

Change-Id: I4cc1e9ca51af9f8f21e22214af2110a6d8be8fe7
Reviewed-on: https://chromium-review.googlesource.com/1158709Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579802}
parent 32eb332b
...@@ -70,15 +70,29 @@ def DownloadChrome(revision, dest_dir, site=Site.CHROMIUM_SNAPSHOT): ...@@ -70,15 +70,29 @@ def DownloadChrome(revision, dest_dir, site=Site.CHROMIUM_SNAPSHOT):
zip_path = os.path.join(dest_dir, 'chrome-%s.zip' % revision) zip_path = os.path.join(dest_dir, 'chrome-%s.zip' % revision)
if not os.path.exists(zip_path): if not os.path.exists(zip_path):
url = site + '/%s/%s' % (_GetDownloadPlatform(), GetZipName(revision)) legacy = int(revision) < 579575
url = site + '/%s/%s' % (_GetDownloadPlatform(legacy), GetZipName(revision))
print 'Downloading', url, '...' print 'Downloading', url, '...'
urllib.urlretrieve(url, zip_path) urllib.urlretrieve(url, zip_path)
util.Unzip(zip_path, dest_dir) util.Unzip(zip_path, dest_dir)
return os.path.join(dest_dir, GetDirName(), GetChromePathFromPackage()) return os.path.join(dest_dir, GetDirName(), GetChromePathFromPackage())
def _GetDownloadPlatform(): def _GetDownloadPlatform(legacy=False):
"""Returns the name for this platform on the archive site.""" """Returns the name for this platform on the archive site.
Args:
legacy: When True, return name used for builds before revision 579575.
TODO(johnchen@chromium.org): Remove when we stop supporting m69.
"""
if legacy:
if util.IsWindows():
return 'Win'
elif util.IsMac():
return 'Mac'
elif util.IsLinux():
return 'Linux_x64'
if util.IsWindows(): if util.IsWindows():
return 'win32_rel' return 'win32_rel'
elif util.IsMac(): elif util.IsMac():
......
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