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

Unified Diff: build/android/buildbot/bb_device_steps.py

Issue 24224006: [chromedriver] Fixes for android tests gating chromedriver release. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed frankf's comments Created 7 years, 3 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 | chrome/test/chromedriver/run_buildbot_steps.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_device_steps.py
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py
index 4c99591d198de766641e48a819dcef77c12a179d..f8d98b96c3ed26faf0f88d124ce6a0c2a7e0c6af 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -76,6 +76,21 @@ VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'webkit',
RunCmd = bb_utils.RunCmd
+def _GetRevision(options):
+ """Get the SVN revision number.
+
+ Args:
+ options: options object.
+
+ Returns:
+ The revision number.
+ """
+ revision = options.build_properties.get('got_revision')
+ if not revision:
+ revision = options.build_properties.get('revision', 'testing')
+ return revision
+
+
# multiprocessing map_async requires a top-level function for pickle library.
def RebootDeviceSafe(device):
"""Reboot a device, wait for it to start, and squelch timeout exceptions."""
@@ -126,14 +141,16 @@ def RunTestSuites(options, suites):
cmd.append('--num_retries=1')
RunCmd(cmd)
-def RunChromeDriverTests(_):
+def RunChromeDriverTests(options):
"""Run all the steps for running chromedriver tests."""
bb_annotations.PrintNamedStep('chromedriver_annotation')
RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py',
'--android-packages=%s,%s,%s' %
(constants.PACKAGE_INFO['chromium_test_shell'].package,
constants.PACKAGE_INFO['chrome_stable'].package,
- constants.PACKAGE_INFO['chrome_beta'].package)])
+ constants.PACKAGE_INFO['chrome_beta'].package),
+ '--revision=%s' % _GetRevision(options),
+ '--update_log'])
def InstallApk(options, test, print_step=False):
"""Install an apk to all phones.
@@ -362,9 +379,7 @@ def UploadHTML(options, gs_base_dir, dir_to_upload, link_text,
link_rel_path: Link path relative to |dir_to_upload|.
gs_url: Google storage URL.
"""
- revision = options.build_properties.get('got_revision')
- if not revision:
- revision = options.build_properties.get('revision', 'testing')
+ revision = _GetRevision(options)
bot_id = options.build_properties.get('buildername', 'testing')
randhash = hashlib.sha1(str(random.random())).hexdigest()
gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash)
« no previous file with comments | « no previous file | chrome/test/chromedriver/run_buildbot_steps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698