Commit 9f37ba5a authored by Quinten Yearsley's avatar Quinten Yearsley Committed by Commit Bot

Remove Buildbot build link in wpt import CLs

This has been dead code since the LUCI migration.

Bug: 1002702
Change-Id: I6410a979d121bfec9867d3663000d65c86e2329a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1909274Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714631}
parent 72ad9e71
...@@ -196,17 +196,6 @@ class TestResultsFetcher(object): ...@@ -196,17 +196,6 @@ class TestResultsFetcher(object):
return WebTestResults.results_from_string(data) return WebTestResults.results_from_string(data)
def current_build_link(host):
"""Returns a link to the current job if running on buildbot, or None."""
master_name = host.environ.get('BUILDBOT_MASTERNAME')
builder_name = host.environ.get('BUILDBOT_BUILDERNAME')
build_number = host.environ.get('BUILDBOT_BUILDNUMBER')
if not (master_name and builder_name and build_number):
return None
return ('https://ci.chromium.org/buildbot/%s/%s/%s' %
(master_name, builder_name, build_number))
def filter_latest_builds(builds): def filter_latest_builds(builds):
"""Filters Build objects to include only the latest for each builder. """Filters Build objects to include only the latest for each builder.
......
...@@ -19,7 +19,6 @@ import re ...@@ -19,7 +19,6 @@ import re
from blinkpy.common.net.git_cl import GitCL from blinkpy.common.net.git_cl import GitCL
from blinkpy.common.net.network_transaction import NetworkTimeout from blinkpy.common.net.network_transaction import NetworkTimeout
from blinkpy.common.net.results_fetcher import current_build_link
from blinkpy.common.path_finder import PathFinder from blinkpy.common.path_finder import PathFinder
from blinkpy.common.system.executive import ScriptError from blinkpy.common.system.executive import ScriptError
from blinkpy.common.system.log_utils import configure_logging from blinkpy.common.system.log_utils import configure_logging
...@@ -502,10 +501,6 @@ class TestImporter(object): ...@@ -502,10 +501,6 @@ class TestImporter(object):
""" """
# TODO(robertma): Add a method in Git for getting the commit body. # TODO(robertma): Add a method in Git for getting the commit body.
description = self.chromium_git.run(['log', '-1', '--format=%B']) description = self.chromium_git.run(['log', '-1', '--format=%B'])
build_link = current_build_link(self.host)
if build_link:
description += 'Build: %s\n\n' % build_link
description += ( description += (
'Note to sheriffs: This CL imports external tests and adds\n' 'Note to sheriffs: This CL imports external tests and adds\n'
'expectations for those tests; if this CL is large and causes\n' 'expectations for those tests; if this CL is large and causes\n'
......
...@@ -359,19 +359,6 @@ class TestImporterTest(LoggingTestCase): ...@@ -359,19 +359,6 @@ class TestImporterTest(LoggingTestCase):
'No-Export: true') 'No-Export: true')
self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']]) self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
def test_cl_description_with_environ_variables(self):
host = MockHost()
host.executive = MockExecutive(output='Last commit message\n')
importer = TestImporter(host)
importer.host.environ['BUILDBOT_MASTERNAME'] = 'my.master'
importer.host.environ['BUILDBOT_BUILDERNAME'] = 'b'
importer.host.environ['BUILDBOT_BUILDNUMBER'] = '123'
description = importer._cl_description(directory_owners={})
self.assertIn(
'Build: https://ci.chromium.org/buildbot/my.master/b/123\n\n',
description)
self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
def test_cl_description_moves_noexport_tag(self): def test_cl_description_moves_noexport_tag(self):
host = MockHost() host = MockHost()
host.executive = MockExecutive(output='Summary\n\nNo-Export: true\n\n') host.executive = MockExecutive(output='Summary\n\nNo-Export: true\n\n')
......
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