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

Unified Diff: tools/testing/webdriver_test_setup.py

Issue 10832149: Update script to switch through revision history successfully. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« tools/get_archive.py ('K') | « tools/testing/perf_testing/run_perf_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/webdriver_test_setup.py
===================================================================
--- tools/testing/webdriver_test_setup.py (revision 10269)
+++ tools/testing/webdriver_test_setup.py (working copy)
@@ -108,15 +108,26 @@
name = self.download_name_func({'os': self.get_os_str, 'version': ''})
name = name[:name.rfind('.')]
version_str = line[line.find(name) + len(name) : suffix_index]
+ orig_version_str = version_str
+ if version_str.count('.') == 0:
+ version_str = version_str.replace('_', '.')
+ version_str = re.compile(r'[^\d.]+').sub('', version_str)
if latest == '':
latest = '0.' * version_str.count('.')
latest += '0'
+ orig_latest_str = latest
+ else:
+ orig_latest_str = latest
+ latest = latest.replace('_', '.')
+ latest = re.compile(r'[^\d.]+').sub('', latest)
nums = version_str.split('.')
latest_nums = latest.split('.')
for (num, latest_num) in zip(nums, latest_nums):
if int(num) > int(latest_num):
- latest = version_str
+ latest = orig_version_str
break
+ else:
+ latest = orig_latest_str
if latest == '':
raise Exception("Couldn't find the desired download on " + \
' %s.' % google_code_site)
« tools/get_archive.py ('K') | « tools/testing/perf_testing/run_perf_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698