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

Unified Diff: tools/auto_bisect/request_build.py

Issue 994183002: Make android-chrome bisect work with archives. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « tools/auto_bisect/fetch_build_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/request_build.py
diff --git a/tools/auto_bisect/request_build.py b/tools/auto_bisect/request_build.py
index 77ce63b4b04ab482b01b6c679b43a81546a1e99d..c43cf5cd471cc449a199ffde820109f74023115a 100644
--- a/tools/auto_bisect/request_build.py
+++ b/tools/auto_bisect/request_build.py
@@ -28,10 +28,6 @@ BUILDER_JSON_URL = ('%(server_url)s/json/builders/%(bot_name)s/builds/'
# URL template for displaying build steps.
BUILDER_HTML_URL = '%(server_url)s/builders/%(bot_name)s/builds/%(build_num)s'
-# Try server status page URLs, used to get build status.
-PERF_TRY_SERVER_URL = 'http://build.chromium.org/p/tryserver.chromium.perf'
-LINUX_TRY_SERVER_URL = 'http://build.chromium.org/p/tryserver.chromium.linux'
-
# Status codes that can be returned by the GetBuildStatus method
# From buildbot.status.builder.
# See: http://docs.buildbot.net/current/developer/results.html
@@ -151,44 +147,21 @@ def _GetBuildData(buildbot_url):
return None
-def _GetBuildBotUrl(builder_type):
- """Gets build bot URL for fetching build info.
-
- Bisect builder bots are hosted on tryserver.chromium.perf, though we cannot
- access this tryserver using host and port number directly, so we use another
- tryserver URL for the perf tryserver.
-
- Args:
- builder_type: Determines what type of builder is used, e.g. "perf".
-
- Returns:
- URL of the buildbot as a string.
- """
- if builder_type == fetch_build.PERF_BUILDER:
- return PERF_TRY_SERVER_URL
- if builder_type == fetch_build.FULL_BUILDER:
- return LINUX_TRY_SERVER_URL
- raise NotImplementedError('Unsupported builder type "%s".' % builder_type)
-
-
-def GetBuildStatus(build_num, bot_name, builder_type):
+def GetBuildStatus(build_num, bot_name, server_url):
"""Gets build status from the buildbot status page for a given build number.
Args:
build_num: A build number on tryserver to determine its status.
bot_name: Name of the bot where the build information is scanned.
- builder_type: Type of builder, e.g. "perf".
+ server_url: URL of the buildbot.
Returns:
A pair which consists of build status (SUCCESS, FAILED or PENDING) and a
link to build status page on the waterfall.
"""
- # TODO(prasadv, qyearsley): Make this a method of BuildArchive
- # (which may be renamed to BuilderTryBot or Builder).
results_url = None
if build_num:
# Get the URL for requesting JSON data with status information.
- server_url = _GetBuildBotUrl(builder_type)
buildbot_url = BUILDER_JSON_URL % {
'server_url': server_url,
'bot_name': bot_name,
@@ -210,7 +183,7 @@ def GetBuildStatus(build_num, bot_name, builder_type):
return (PENDING, results_url)
-def GetBuildNumFromBuilder(build_reason, bot_name, builder_type):
+def GetBuildNumFromBuilder(build_reason, bot_name, server_url):
"""Gets build number on build status page for a given 'build reason'.
This function parses the JSON data from buildbot page and collects basic
@@ -223,15 +196,11 @@ def GetBuildNumFromBuilder(build_reason, bot_name, builder_type):
Args:
build_reason: A unique build name set to build on tryserver.
bot_name: Name of the bot where the build information is scanned.
- builder_type: Type of builder, e.g. "perf".
+ server_url: URL of the buildbot.
Returns:
A build number as a string if found, otherwise None.
"""
- # TODO(prasadv, qyearsley): Make this a method of BuildArchive
- # (which may be renamed to BuilderTryBot or Builder).
- # Gets the buildbot url for the given host and port.
- server_url = _GetBuildBotUrl(builder_type)
buildbot_url = BUILDER_JSON_URL % {
'server_url': server_url,
'bot_name': bot_name,
« no previous file with comments | « tools/auto_bisect/fetch_build_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698