Commit 8fd97193 authored by Quinten Yearsley's avatar Quinten Yearsley Committed by Commit Bot

Rename "buildbot" module to "results_fetcher"

This would also rename BuildBot class to TestResultsFetcher,
and rename the attribute buildbot to results_fetcher.

These classes have nothing to do with Buildbot, which is
no longer used. They do seem to be basically about fetching
results of tests that were run on bots.

Bug: 1002702
Change-Id: Ie877f4c16e8edde5023366a299dabb657a0ecd52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894618Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713977}
parent 23f0bf15
...@@ -31,7 +31,7 @@ import logging ...@@ -31,7 +31,7 @@ import logging
from blinkpy.common.checkout.git import Git from blinkpy.common.checkout.git import Git
from blinkpy.common.net import web from blinkpy.common.net import web
from blinkpy.common.net.buildbot import BuildBot from blinkpy.common.net.results_fetcher import TestResultsFetcher
from blinkpy.common.system.system_host import SystemHost from blinkpy.common.system.system_host import SystemHost
from blinkpy.web_tests.builder_list import BuilderList from blinkpy.web_tests.builder_list import BuilderList
from blinkpy.web_tests.port.factory import PortFactory from blinkpy.web_tests.port.factory import PortFactory
...@@ -49,7 +49,7 @@ class Host(SystemHost): ...@@ -49,7 +49,7 @@ class Host(SystemHost):
self._git = None self._git = None
# Everything below this line is WebKit-specific and belongs on a higher-level object. # Everything below this line is WebKit-specific and belongs on a higher-level object.
self.buildbot = BuildBot() self.results_fetcher = TestResultsFetcher()
# FIXME: Unfortunately Port objects are currently the central-dispatch objects of the NRWT world. # FIXME: Unfortunately Port objects are currently the central-dispatch objects of the NRWT world.
# In order to instantiate a port correctly, we have to pass it at least an executive, user, git, and filesystem # In order to instantiate a port correctly, we have to pass it at least an executive, user, git, and filesystem
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from blinkpy.common.checkout.git_mock import MockGit from blinkpy.common.checkout.git_mock import MockGit
from blinkpy.common.net.buildbot_mock import MockBuildBot from blinkpy.common.net.results_fetcher_mock import MockTestResultsFetcher
from blinkpy.common.net.web_mock import MockWeb from blinkpy.common.net.web_mock import MockWeb
from blinkpy.common.path_finder import PathFinder from blinkpy.common.path_finder import PathFinder
from blinkpy.common.system.system_host_mock import MockSystemHost from blinkpy.common.system.system_host_mock import MockSystemHost
...@@ -59,7 +59,7 @@ class MockHost(MockSystemHost): ...@@ -59,7 +59,7 @@ class MockHost(MockSystemHost):
self.web = web or MockWeb() self.web = web or MockWeb()
self._git = git self._git = git
self.buildbot = MockBuildBot() self.results_fetcher = MockTestResultsFetcher()
# Note: We're using a real PortFactory here. Tests which don't wish to depend # Note: We're using a real PortFactory here. Tests which don't wish to depend
# on the list of known ports should override this with a MockPortFactory. # on the list of known ports should override this with a MockPortFactory.
......
...@@ -14,7 +14,7 @@ import logging ...@@ -14,7 +14,7 @@ import logging
import re import re
from blinkpy.common.checkout.git import Git from blinkpy.common.checkout.git import Git
from blinkpy.common.net.buildbot import Build, filter_latest_builds from blinkpy.common.net.results_fetcher import Build, filter_latest_builds
from blinkpy.common.net.luci_auth import LuciAuth from blinkpy.common.net.luci_auth import LuciAuth
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import unittest import unittest
from blinkpy.common.host_mock import MockHost from blinkpy.common.host_mock import MockHost
from blinkpy.common.net.buildbot import Build from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.net.git_cl import CLStatus from blinkpy.common.net.git_cl import CLStatus
from blinkpy.common.net.git_cl import GitCL from blinkpy.common.net.git_cl import GitCL
from blinkpy.common.net.git_cl import SEARCHBUILDS_RESPONSE_PREFIX from blinkpy.common.net.git_cl import SEARCHBUILDS_RESPONSE_PREFIX
......
...@@ -53,8 +53,8 @@ class Build(collections.namedtuple('Build', ('builder_name', 'build_number'))): ...@@ -53,8 +53,8 @@ class Build(collections.namedtuple('Build', ('builder_name', 'build_number'))):
return super(Build, cls).__new__(cls, builder_name, build_number) return super(Build, cls).__new__(cls, builder_name, build_number)
class BuildBot(object): class TestResultsFetcher(object):
"""This class represents an interface to BuildBot-related functionality. """This class represents an interface to test results for particular builds.
This includes fetching web test results from Google Storage; This includes fetching web test results from Google Storage;
for more information about the web test result format, see: for more information about the web test result format, see:
......
...@@ -26,14 +26,15 @@ ...@@ -26,14 +26,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from blinkpy.common.net.buildbot import BuildBot from blinkpy.common.net.results_fetcher import TestResultsFetcher
# TODO(qyearsley): To be consistent with other fake ("mock") classes, this # TODO(qyearsley): To be consistent with other fake ("mock") classes, this
# could be changed so it's not a subclass of BuildBot. # could be changed so it's not a subclass of TestResultsFetcher.
class MockBuildBot(BuildBot): class MockTestResultsFetcher(TestResultsFetcher):
def __init__(self): def __init__(self):
super(MockBuildBot, self).__init__() super(MockTestResultsFetcher, self).__init__()
self._canned_results = {} self._canned_results = {}
self._canned_retry_summary_json = {} self._canned_retry_summary_json = {}
self._webdriver_results = {} self._webdriver_results = {}
......
...@@ -30,7 +30,7 @@ import json ...@@ -30,7 +30,7 @@ import json
import logging import logging
import unittest import unittest
from blinkpy.common.net.buildbot import BuildBot, Build, filter_latest_builds from blinkpy.common.net.results_fetcher import TestResultsFetcher, Build, filter_latest_builds
from blinkpy.common.net.web_mock import MockWeb from blinkpy.common.net.web_mock import MockWeb
from blinkpy.common.system.log_testing import LoggingTestCase from blinkpy.common.system.log_testing import LoggingTestCase
...@@ -42,39 +42,39 @@ class BuilderTest(LoggingTestCase): ...@@ -42,39 +42,39 @@ class BuilderTest(LoggingTestCase):
def test_results_url_no_build_number(self): def test_results_url_no_build_number(self):
self.assertEqual( self.assertEqual(
BuildBot().results_url('Test Builder'), TestResultsFetcher().results_url('Test Builder'),
'https://test-results.appspot.com/data/layout_results/Test_Builder/results/layout-test-results') 'https://test-results.appspot.com/data/layout_results/Test_Builder/results/layout-test-results')
def test_results_url_with_build_number(self): def test_results_url_with_build_number(self):
self.assertEqual( self.assertEqual(
BuildBot().results_url('Test Builder', 10), TestResultsFetcher().results_url('Test Builder', 10),
'https://test-results.appspot.com/data/layout_results/Test_Builder/10/layout-test-results') 'https://test-results.appspot.com/data/layout_results/Test_Builder/10/layout-test-results')
def test_results_url_with_build_number_step_name(self): def test_results_url_with_build_number_step_name(self):
self.assertEqual( self.assertEqual(
BuildBot().results_url('Test Builder', 10, TestResultsFetcher().results_url('Test Builder', 10,
'webkit_layout_tests (with patch)'), 'webkit_layout_tests (with patch)'),
'https://test-results.appspot.com/data/layout_results/Test_Builder' 'https://test-results.appspot.com/data/layout_results/Test_Builder'
'/10/webkit_layout_tests%20%28with%20patch%29/layout-test-results') '/10/webkit_layout_tests%20%28with%20patch%29/layout-test-results')
def test_results_url_with_non_numeric_build_number(self): def test_results_url_with_non_numeric_build_number(self):
with self.assertRaisesRegexp(AssertionError, 'expected numeric build number'): with self.assertRaisesRegexp(AssertionError, 'expected numeric build number'):
BuildBot().results_url('Test Builder', 'ba5eba11') TestResultsFetcher().results_url('Test Builder', 'ba5eba11')
def test_builder_results_url_base(self): def test_builder_results_url_base(self):
self.assertEqual( self.assertEqual(
BuildBot().builder_results_url_base('WebKit Mac10.8 (dbg)'), TestResultsFetcher().builder_results_url_base('WebKit Mac10.8 (dbg)'),
'https://test-results.appspot.com/data/layout_results/WebKit_Mac10_8__dbg_') 'https://test-results.appspot.com/data/layout_results/WebKit_Mac10_8__dbg_')
def test_accumulated_results_url(self): def test_accumulated_results_url(self):
self.assertEqual( self.assertEqual(
BuildBot().accumulated_results_url_base('WebKit Mac10.8 (dbg)'), TestResultsFetcher().accumulated_results_url_base('WebKit Mac10.8 (dbg)'),
'https://test-results.appspot.com/data/layout_results/WebKit_Mac10_8__dbg_/results/layout-test-results') 'https://test-results.appspot.com/data/layout_results/WebKit_Mac10_8__dbg_/results/layout-test-results')
def test_fetch_web_test_results_with_no_results_fetched(self): def test_fetch_web_test_results_with_no_results_fetched(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
buildbot.web = MockWeb() fetcher.web = MockWeb()
results = buildbot.fetch_web_test_results(buildbot.results_url('B')) results = fetcher.fetch_web_test_results(fetcher.results_url('B'))
self.assertIsNone(results) self.assertIsNone(results)
self.assertLog([ self.assertLog([
'DEBUG: Got 404 response from:\n' 'DEBUG: Got 404 response from:\n'
...@@ -82,8 +82,8 @@ class BuilderTest(LoggingTestCase): ...@@ -82,8 +82,8 @@ class BuilderTest(LoggingTestCase):
]) ])
def test_fetch_results_with_weird_step_name(self): def test_fetch_results_with_weird_step_name(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
buildbot.web = MockWeb(urls={ fetcher.web = MockWeb(urls={
'https://test-results.appspot.com/testfile?buildnumber=123&' 'https://test-results.appspot.com/testfile?buildnumber=123&'
'callback=ADD_RESULTS&builder=builder&name=full_results.json': 'callback=ADD_RESULTS&builder=builder&name=full_results.json':
'ADD_RESULTS(%s);' % (json.dumps( 'ADD_RESULTS(%s);' % (json.dumps(
...@@ -94,19 +94,19 @@ class BuilderTest(LoggingTestCase): ...@@ -94,19 +94,19 @@ class BuilderTest(LoggingTestCase):
'layout-test-results/failing_results.json': 'layout-test-results/failing_results.json':
json.dumps({'passed': True}), json.dumps({'passed': True}),
}) })
results = buildbot.fetch_results(Build('builder', 123)) results = fetcher.fetch_results(Build('builder', 123))
self.assertEqual(results._results, { # pylint: disable=protected-access self.assertEqual(results._results, { # pylint: disable=protected-access
'passed': True 'passed': True
}) })
self.assertLog([]) self.assertLog([])
def test_fetch_results_without_build_number(self): def test_fetch_results_without_build_number(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
self.assertIsNone(buildbot.fetch_results(Build('builder', None))) self.assertIsNone(fetcher.fetch_results(Build('builder', None)))
def test_get_step_name(self): def test_get_step_name(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
buildbot.web = MockWeb(urls={ fetcher.web = MockWeb(urls={
'https://test-results.appspot.com/testfile?buildnumber=5&' 'https://test-results.appspot.com/testfile?buildnumber=5&'
'callback=ADD_RESULTS&builder=foo&name=full_results.json': 'callback=ADD_RESULTS&builder=foo&name=full_results.json':
'ADD_RESULTS(%s);' % (json.dumps( 'ADD_RESULTS(%s);' % (json.dumps(
...@@ -115,33 +115,33 @@ class BuilderTest(LoggingTestCase): ...@@ -115,33 +115,33 @@ class BuilderTest(LoggingTestCase):
{"TestType": "webkit_layout_tests (retry with patch)"}, {"TestType": "webkit_layout_tests (retry with patch)"},
{"TestType": "base_unittests (with patch)"}])) {"TestType": "base_unittests (with patch)"}]))
}) })
step_name = buildbot.get_layout_test_step_name(Build('foo', 5)) step_name = fetcher.get_layout_test_step_name(Build('foo', 5))
self.assertEqual(step_name, 'webkit_layout_tests (with patch)') self.assertEqual(step_name, 'webkit_layout_tests (with patch)')
self.assertLog([]) self.assertLog([])
def test_get_step_name_without_build_number(self): def test_get_step_name_without_build_number(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
self.assertIsNone( self.assertIsNone(
buildbot.get_layout_test_step_name(Build('builder', None))) fetcher.get_layout_test_step_name(Build('builder', None)))
def test_fetch_webdriver_results_without_build_number(self): def test_fetch_webdriver_results_without_build_number(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
self.assertIsNone(buildbot.fetch_webdriver_test_results( self.assertIsNone(fetcher.fetch_webdriver_test_results(
Build('builder', None), 'bar')) Build('builder', None), 'bar'))
self.assertLog( self.assertLog(
['DEBUG: Builder name or build number or master is None\n']) ['DEBUG: Builder name or build number or master is None\n'])
def test_fetch_webdriver_results_without_master(self): def test_fetch_webdriver_results_without_master(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
self.assertIsNone(buildbot.fetch_webdriver_test_results( self.assertIsNone(fetcher.fetch_webdriver_test_results(
Build('builder', 1), '')) Build('builder', 1), ''))
self.assertLog( self.assertLog(
['DEBUG: Builder name or build number or master is None\n']) ['DEBUG: Builder name or build number or master is None\n'])
def test_fetch_webdriver_test_results_with_no_results(self): def test_fetch_webdriver_test_results_with_no_results(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
buildbot.web = MockWeb() fetcher.web = MockWeb()
results = buildbot.fetch_webdriver_test_results( results = fetcher.fetch_webdriver_test_results(
Build('bar-rel', 123), 'foo.chrome') Build('bar-rel', 123), 'foo.chrome')
self.assertIsNone(results) self.assertIsNone(results)
self.assertLog([ self.assertLog([
...@@ -152,15 +152,15 @@ class BuilderTest(LoggingTestCase): ...@@ -152,15 +152,15 @@ class BuilderTest(LoggingTestCase):
]) ])
def test_fetch_webdriver_results_success(self): def test_fetch_webdriver_results_success(self):
buildbot = BuildBot() fetcher = TestResultsFetcher()
buildbot.web = MockWeb(urls={ fetcher.web = MockWeb(urls={
'https://test-results.appspot.com/testfile?buildnumber=123&' 'https://test-results.appspot.com/testfile?buildnumber=123&'
'master=foo.chrome&builder=bar-rel&' 'master=foo.chrome&builder=bar-rel&'
'testtype=webdriver_tests_suite+%28with+patch%29&' 'testtype=webdriver_tests_suite+%28with+patch%29&'
'name=full_results.json': 'name=full_results.json':
json.dumps({'passed': True}), json.dumps({'passed': True}),
}) })
results = buildbot.fetch_webdriver_test_results( results = fetcher.fetch_webdriver_test_results(
Build('bar-rel', 123), 'foo.chrome') Build('bar-rel', 123), 'foo.chrome')
self.assertEqual(results._results, { # pylint: disable=protected-access self.assertEqual(results._results, { # pylint: disable=protected-access
'passed': True 'passed': True
...@@ -168,7 +168,7 @@ class BuilderTest(LoggingTestCase): ...@@ -168,7 +168,7 @@ class BuilderTest(LoggingTestCase):
self.assertLog([]) self.assertLog([])
class BuildBotHelperFunctionTest(unittest.TestCase): class TestResultsFetcherHelperFunctionTest(unittest.TestCase):
def test_filter_latest_jobs_empty(self): def test_filter_latest_jobs_empty(self):
self.assertEqual(filter_latest_builds([]), []) self.assertEqual(filter_latest_builds([]), [])
......
...@@ -34,7 +34,7 @@ import re ...@@ -34,7 +34,7 @@ import re
from blinkpy.common.path_finder import WEB_TESTS_LAST_COMPONENT from blinkpy.common.path_finder import WEB_TESTS_LAST_COMPONENT
from blinkpy.common.memoized import memoized from blinkpy.common.memoized import memoized
from blinkpy.common.net.buildbot import Build from blinkpy.common.net.results_fetcher import Build
from blinkpy.tool.commands.command import Command from blinkpy.tool.commands.command import Command
from blinkpy.web_tests.models import test_failures from blinkpy.web_tests.models import test_failures
from blinkpy.web_tests.models.test_expectations import TestExpectations from blinkpy.web_tests.models.test_expectations import TestExpectations
...@@ -312,7 +312,7 @@ class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand): ...@@ -312,7 +312,7 @@ class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
if options.results_directory: if options.results_directory:
args.extend(['--results-directory', options.results_directory]) args.extend(['--results-directory', options.results_directory])
step_name = self._tool.buildbot.get_layout_test_step_name(build) step_name = self._tool.results_fetcher.get_layout_test_step_name(build)
if step_name: if step_name:
args.extend(['--step-name', step_name]) args.extend(['--step-name', step_name])
...@@ -512,7 +512,7 @@ class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand): ...@@ -512,7 +512,7 @@ class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
def _result_for_test(self, test, build): def _result_for_test(self, test, build):
# We need full results to know if a test passed or was skipped. # We need full results to know if a test passed or was skipped.
# TODO(robertma): Make memoized support kwargs, and use full=True here. # TODO(robertma): Make memoized support kwargs, and use full=True here.
results = self._tool.buildbot.fetch_results(build, True) results = self._tool.results_fetcher.fetch_results(build, True)
if not results: if not results:
_log.debug('No results found for build %s', build) _log.debug('No results found for build %s', build)
return None return None
......
...@@ -218,7 +218,7 @@ class RebaselineCL(AbstractParallelRebaselineCommand): ...@@ -218,7 +218,7 @@ class RebaselineCL(AbstractParallelRebaselineCommand):
Returns: Returns:
A dict mapping Build to WebTestResults for all completed jobs. A dict mapping Build to WebTestResults for all completed jobs.
""" """
buildbot = self._tool.buildbot results_fetcher = self._tool.results_fetcher
results = {} results = {}
for build, status in jobs.iteritems(): for build, status in jobs.iteritems():
if status == TryJobStatus('COMPLETED', 'SUCCESS'): if status == TryJobStatus('COMPLETED', 'SUCCESS'):
...@@ -230,8 +230,8 @@ class RebaselineCL(AbstractParallelRebaselineCommand): ...@@ -230,8 +230,8 @@ class RebaselineCL(AbstractParallelRebaselineCommand):
# Only completed failed builds will contain actual failed # Only completed failed builds will contain actual failed
# web tests to download baselines for. # web tests to download baselines for.
continue continue
results_url = buildbot.results_url(build.builder_name, build.build_number) results_url = results_fetcher.results_url(build.builder_name, build.build_number)
web_test_results = buildbot.fetch_results(build) web_test_results = results_fetcher.fetch_results(build)
if web_test_results is None: if web_test_results is None:
_log.info('Failed to fetch results for "%s".', build.builder_name) _log.info('Failed to fetch results for "%s".', build.builder_name)
_log.info('Results URL: %s/results.html', results_url) _log.info('Results URL: %s/results.html', results_url)
...@@ -345,8 +345,8 @@ class RebaselineCL(AbstractParallelRebaselineCommand): ...@@ -345,8 +345,8 @@ class RebaselineCL(AbstractParallelRebaselineCommand):
If the list of new failures could not be obtained, this returns None. If the list of new failures could not be obtained, this returns None.
""" """
buildbot = self._tool.buildbot results_fetcher = self._tool.results_fetcher
content = buildbot.fetch_retry_summary_json(build) content = results_fetcher.fetch_retry_summary_json(build)
if content is None: if content is None:
return None return None
try: try:
......
...@@ -7,9 +7,9 @@ import optparse ...@@ -7,9 +7,9 @@ import optparse
import textwrap import textwrap
from blinkpy.common.checkout.git_mock import MockGit from blinkpy.common.checkout.git_mock import MockGit
from blinkpy.common.net.buildbot import Build
from blinkpy.common.net.git_cl import TryJobStatus from blinkpy.common.net.git_cl import TryJobStatus
from blinkpy.common.net.git_cl_mock import MockGitCL from blinkpy.common.net.git_cl_mock import MockGitCL
from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.net.web_test_results import WebTestResults from blinkpy.common.net.web_test_results import WebTestResults
from blinkpy.common.path_finder import RELATIVE_WEB_TESTS from blinkpy.common.path_finder import RELATIVE_WEB_TESTS
from blinkpy.common.system.log_testing import LoggingTestCase from blinkpy.common.system.log_testing import LoggingTestCase
...@@ -95,8 +95,8 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase): ...@@ -95,8 +95,8 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
}) })
for build in builds: for build in builds:
self.tool.buildbot.set_results(build, web_test_results) self.tool.results_fetcher.set_results(build, web_test_results)
self.tool.buildbot.set_retry_sumary_json(build, json.dumps({ self.tool.results_fetcher.set_retry_sumary_json(build, json.dumps({
'failures': [ 'failures': [
'one/flaky-fail.html', 'one/flaky-fail.html',
'one/missing.html', 'one/missing.html',
...@@ -344,7 +344,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase): ...@@ -344,7 +344,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
Build('MOCK Try Linux', 6000): TryJobStatus('COMPLETED', 'FAILURE'), Build('MOCK Try Linux', 6000): TryJobStatus('COMPLETED', 'FAILURE'),
} }
for build in builds: for build in builds:
self.tool.buildbot.set_retry_sumary_json(build, json.dumps({ self.tool.results_fetcher.set_retry_sumary_json(build, json.dumps({
'failures': ['one/text-fail.html'], 'failures': ['one/text-fail.html'],
'ignored': ['two/image-fail.html'], 'ignored': ['two/image-fail.html'],
})) }))
...@@ -358,7 +358,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase): ...@@ -358,7 +358,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
def test_execute_with_no_retry_summary_downloaded(self): def test_execute_with_no_retry_summary_downloaded(self):
# In this example, the retry summary could not be downloaded, so # In this example, the retry summary could not be downloaded, so
# a warning is printed and all tests are rebaselined. # a warning is printed and all tests are rebaselined.
self.tool.buildbot.set_retry_sumary_json( self.tool.results_fetcher.set_retry_sumary_json(
Build('MOCK Try Win', 5000), None) Build('MOCK Try Win', 5000), None)
exit_code = self.command.execute(self.command_options(), [], self.tool) exit_code = self.command.execute(self.command_options(), [], self.tool)
self.assertEqual(exit_code, 0) self.assertEqual(exit_code, 0)
...@@ -427,7 +427,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase): ...@@ -427,7 +427,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
]) ])
def test_execute_missing_results_with_no_fill_missing_prompts(self): def test_execute_missing_results_with_no_fill_missing_prompts(self):
self.tool.buildbot.set_results(Build('MOCK Try Win', 5000), None) self.tool.results_fetcher.set_results(Build('MOCK Try Win', 5000), None)
exit_code = self.command.execute(self.command_options(), [], self.tool) exit_code = self.command.execute(self.command_options(), [], self.tool)
self.assertEqual(exit_code, 1) self.assertEqual(exit_code, 1)
self.assertLog([ self.assertLog([
...@@ -442,7 +442,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase): ...@@ -442,7 +442,7 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
]) ])
def test_execute_missing_results_with_fill_missing_continues(self): def test_execute_missing_results_with_fill_missing_continues(self):
self.tool.buildbot.set_results(Build('MOCK Try Win', 5000), None) self.tool.results_fetcher.set_results(Build('MOCK Try Win', 5000), None)
exit_code = self.command.execute( exit_code = self.command.execute(
self.command_options(fill_missing=True), self.command_options(fill_missing=True),
['one/flaky-fail.html'], self.tool) ['one/flaky-fail.html'], self.tool)
......
...@@ -35,7 +35,7 @@ class RebaselineTest(AbstractRebaseliningCommand): ...@@ -35,7 +35,7 @@ class RebaselineTest(AbstractRebaseliningCommand):
if options.results_directory: if options.results_directory:
results_url = 'file://' + options.results_directory results_url = 'file://' + options.results_directory
else: else:
results_url = self._tool.buildbot.results_url( results_url = self._tool.results_fetcher.results_url(
options.builder, build_number=options.build_number, options.builder, build_number=options.build_number,
step_name=options.step_name) step_name=options.step_name)
......
...@@ -6,7 +6,7 @@ import json ...@@ -6,7 +6,7 @@ import json
import optparse import optparse
import unittest import unittest
from blinkpy.common.net.buildbot import Build from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.net.web_test_results import WebTestResults from blinkpy.common.net.web_test_results import WebTestResults
from blinkpy.common.path_finder import RELATIVE_WEB_TESTS from blinkpy.common.path_finder import RELATIVE_WEB_TESTS
from blinkpy.common.system.executive_mock import MockExecutive from blinkpy.common.system.executive_mock import MockExecutive
...@@ -89,7 +89,7 @@ class BaseTestCase(unittest.TestCase): ...@@ -89,7 +89,7 @@ class BaseTestCase(unittest.TestCase):
def _setup_mock_build_data(self): def _setup_mock_build_data(self):
for builder in ['MOCK Win7', 'MOCK Win7 (dbg)', 'MOCK Mac10.11']: for builder in ['MOCK Win7', 'MOCK Win7 (dbg)', 'MOCK Mac10.11']:
self.tool.buildbot.set_results(Build(builder), WebTestResults({ self.tool.results_fetcher.set_results(Build(builder), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'first-test.html': { 'first-test.html': {
...@@ -190,7 +190,7 @@ class TestRebaseline(BaseTestCase): ...@@ -190,7 +190,7 @@ class TestRebaseline(BaseTestCase):
}, **kwargs)) }, **kwargs))
def test_rebaseline_test_passes_on_all_builders(self): def test_rebaseline_test_passes_on_all_builders(self):
self.tool.buildbot.set_results(Build('MOCK Win7'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Win7'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'first-test.html': { 'first-test.html': {
...@@ -482,7 +482,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -482,7 +482,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
('Bug(x) [ Mac ] userscripts/skipped-test.html [ WontFix ]\n' ('Bug(x) [ Mac ] userscripts/skipped-test.html [ WontFix ]\n'
'Bug(y) [ Win ] userscripts/skipped-test.html [ Skip ]\n')) 'Bug(y) [ Win ] userscripts/skipped-test.html [ Skip ]\n'))
self._write('userscripts/skipped-test.html', 'Dummy test contents') self._write('userscripts/skipped-test.html', 'Dummy test contents')
self.tool.buildbot.set_results(Build('MOCK Mac10.11'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Mac10.11'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'skipped-test.html': { 'skipped-test.html': {
...@@ -492,7 +492,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -492,7 +492,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
} }
} }
})) }))
self.tool.buildbot.set_results(Build('MOCK Win7'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Win7'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'skipped-test.html': { 'skipped-test.html': {
...@@ -519,7 +519,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -519,7 +519,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
# Flaky expectations should be kept even if the test passes. # Flaky expectations should be kept even if the test passes.
self._write(self.test_expectations_path, 'Bug(x) userscripts/flaky-test.html [ Pass Failure ]\n') self._write(self.test_expectations_path, 'Bug(x) userscripts/flaky-test.html [ Pass Failure ]\n')
self._write('userscripts/flaky-test.html', 'Dummy test contents') self._write('userscripts/flaky-test.html', 'Dummy test contents')
self.tool.buildbot.set_results(Build('MOCK Mac10.11'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Mac10.11'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'flaky-test.html': { 'flaky-test.html': {
...@@ -545,7 +545,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -545,7 +545,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
self._write(self.test_expectations_path, 'Bug(foo) userscripts/all-pass.html [ Failure ]\n') self._write(self.test_expectations_path, 'Bug(foo) userscripts/all-pass.html [ Failure ]\n')
self._write('userscripts/all-pass.html', 'Dummy test contents') self._write('userscripts/all-pass.html', 'Dummy test contents')
test_baseline_set = TestBaselineSet(self.tool) test_baseline_set = TestBaselineSet(self.tool)
self.tool.buildbot.set_results(Build('MOCK Mac10.11'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Mac10.11'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'all-pass.html': { 'all-pass.html': {
...@@ -572,7 +572,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -572,7 +572,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
self._write('userscripts/all-pass.html', 'Dummy test contents') self._write('userscripts/all-pass.html', 'Dummy test contents')
test_baseline_set = TestBaselineSet(self.tool) test_baseline_set = TestBaselineSet(self.tool)
for builder in ['MOCK Win7', 'MOCK Win10', 'MOCK Mac10.10', 'MOCK Mac10.11', 'MOCK Precise', 'MOCK Trusty']: for builder in ['MOCK Win7', 'MOCK Win10', 'MOCK Mac10.10', 'MOCK Mac10.11', 'MOCK Precise', 'MOCK Trusty']:
self.tool.buildbot.set_results(Build(builder), WebTestResults({ self.tool.results_fetcher.set_results(Build(builder), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'all-pass.html': { 'all-pass.html': {
...@@ -599,7 +599,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase): ...@@ -599,7 +599,7 @@ class TestRebaselineUpdatesExpectationsFiles(BaseTestCase):
self._write(self.test_expectations_path, 'Bug(foo) userscripts/all-pass.html [ Failure ]\n') self._write(self.test_expectations_path, 'Bug(foo) userscripts/all-pass.html [ Failure ]\n')
self._write('userscripts/all-pass.html', 'Dummy test contents') self._write('userscripts/all-pass.html', 'Dummy test contents')
test_baseline_set = TestBaselineSet(self.tool) test_baseline_set = TestBaselineSet(self.tool)
self.tool.buildbot.set_results(Build('MOCK Mac10.11'), WebTestResults({ self.tool.results_fetcher.set_results(Build('MOCK Mac10.11'), WebTestResults({
'tests': { 'tests': {
'userscripts': { 'userscripts': {
'all-pass.html': { 'all-pass.html': {
......
...@@ -17,9 +17,9 @@ import json ...@@ -17,9 +17,9 @@ import json
import logging import logging
import re import re
from blinkpy.common.net.buildbot import current_build_link
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
......
...@@ -7,11 +7,11 @@ import json ...@@ -7,11 +7,11 @@ import json
from blinkpy.common.checkout.git_mock import MockGit from blinkpy.common.checkout.git_mock import MockGit
from blinkpy.common.host_mock import MockHost from blinkpy.common.host_mock import MockHost
from blinkpy.common.net.buildbot import Build
from blinkpy.common.net.git_cl import CLStatus from blinkpy.common.net.git_cl import CLStatus
from blinkpy.common.net.git_cl import TryJobStatus from blinkpy.common.net.git_cl import TryJobStatus
from blinkpy.common.net.git_cl_mock import MockGitCL from blinkpy.common.net.git_cl_mock import MockGitCL
from blinkpy.common.net.network_transaction import NetworkTimeout from blinkpy.common.net.network_transaction import NetworkTimeout
from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.path_finder import RELATIVE_WEB_TESTS from blinkpy.common.path_finder import RELATIVE_WEB_TESTS
from blinkpy.common.system.executive_mock import MockCall from blinkpy.common.system.executive_mock import MockCall
from blinkpy.common.system.executive_mock import MockExecutive from blinkpy.common.system.executive_mock import MockExecutive
......
...@@ -131,14 +131,14 @@ class WPTExpectationsUpdater(object): ...@@ -131,14 +131,14 @@ class WPTExpectationsUpdater(object):
# All tests passed, so there should be no failing results. # All tests passed, so there should be no failing results.
return {} return {}
test_result_list = [self.host.buildbot.fetch_results(build)] test_result_list = [self.host.results_fetcher.fetch_results(build)]
has_webdriver_tests = self.host.builders.has_webdriver_tests_for_builder( has_webdriver_tests = self.host.builders.has_webdriver_tests_for_builder(
build.builder_name) build.builder_name)
if has_webdriver_tests: if has_webdriver_tests:
master = self.host.builders.master_for_builder( master = self.host.builders.master_for_builder(
build.builder_name) build.builder_name)
test_result_list.append( test_result_list.append(
self.host.buildbot.fetch_webdriver_test_results(build, master)) self.host.results_fetcher.fetch_webdriver_test_results(build, master))
test_result_list = filter(None, test_result_list) test_result_list = filter(None, test_result_list)
if not test_result_list: if not test_result_list:
......
...@@ -6,10 +6,10 @@ import copy ...@@ -6,10 +6,10 @@ import copy
import json import json
from blinkpy.common.host_mock import MockHost from blinkpy.common.host_mock import MockHost
from blinkpy.common.net.buildbot import Build
from blinkpy.common.net.buildbot_mock import MockBuildBot
from blinkpy.common.net.git_cl import TryJobStatus from blinkpy.common.net.git_cl import TryJobStatus
from blinkpy.common.net.git_cl_mock import MockGitCL from blinkpy.common.net.git_cl_mock import MockGitCL
from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.net.results_fetcher_mock import MockTestResultsFetcher
from blinkpy.common.net.web_test_results import WebTestResult, WebTestResults from blinkpy.common.net.web_test_results import WebTestResult, WebTestResults
from blinkpy.common.system.executive import ScriptError from blinkpy.common.system.executive import ScriptError
from blinkpy.common.system.log_testing import LoggingTestCase from blinkpy.common.system.log_testing import LoggingTestCase
...@@ -107,7 +107,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -107,7 +107,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
# results are for the other builders since we shouldn't need to even # results are for the other builders since we shouldn't need to even
# fetch results, since the try job status already tells us that all # fetch results, since the try job status already tells us that all
# of the tests passed. # of the tests passed.
host.buildbot.set_results( host.results_fetcher.set_results(
Build('MOCK Try Mac10.10', 333), Build('MOCK Try Mac10.10', 333),
WebTestResults({ WebTestResults({
'tests': { 'tests': {
...@@ -127,7 +127,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -127,7 +127,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
self.assertEqual(0, updater.run(args=[])) self.assertEqual(0, updater.run(args=[]))
# Results are only fetched for failing builds. # Results are only fetched for failing builds.
self.assertEqual(host.buildbot.fetched_builds, [Build('MOCK Try Mac10.10', 333)]) self.assertEqual(host.results_fetcher.fetched_builds, [Build('MOCK Try Mac10.10', 333)])
self.assertEqual( self.assertEqual(
host.filesystem.read_text_file(expectations_path), host.filesystem.read_text_file(expectations_path),
...@@ -136,7 +136,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -136,7 +136,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
def test_get_failing_results_dict_only_passing_results(self): def test_get_failing_results_dict_only_passing_results(self):
host = self.mock_host() host = self.mock_host()
host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({ host.results_fetcher.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({
'tests': { 'tests': {
'external': { 'external': {
'wpt': { 'wpt': {
...@@ -156,7 +156,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -156,7 +156,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
def test_get_failing_results_dict_unexpected_pass(self): def test_get_failing_results_dict_unexpected_pass(self):
host = self.mock_host() host = self.mock_host()
host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({ host.results_fetcher.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({
'tests': { 'tests': {
'external': { 'external': {
'wpt': { 'wpt': {
...@@ -177,15 +177,15 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -177,15 +177,15 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
def test_get_failing_results_dict_no_results(self): def test_get_failing_results_dict_no_results(self):
host = self.mock_host() host = self.mock_host()
host.buildbot = MockBuildBot() host.results_fetcher = MockTestResultsFetcher()
host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), None) host.results_fetcher.set_results(Build('MOCK Try Mac10.10', 123), None)
updater = WPTExpectationsUpdater(host) updater = WPTExpectationsUpdater(host)
self.assertEqual( self.assertEqual(
updater.get_failing_results_dict(Build('MOCK Try Mac10.10', 123)), {}) updater.get_failing_results_dict(Build('MOCK Try Mac10.10', 123)), {})
def test_get_failing_results_dict_some_failing_results(self): def test_get_failing_results_dict_some_failing_results(self):
host = self.mock_host() host = self.mock_host()
host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({ host.results_fetcher.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({
'tests': { 'tests': {
'external': { 'external': {
'wpt': { 'wpt': {
...@@ -216,7 +216,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -216,7 +216,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
def test_get_failing_results_dict_non_wpt_test(self): def test_get_failing_results_dict_non_wpt_test(self):
host = self.mock_host() host = self.mock_host()
host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({ host.results_fetcher.set_results(Build('MOCK Try Mac10.10', 123), WebTestResults({
'tests': { 'tests': {
'x': { 'x': {
'failing-test.html': { 'failing-test.html': {
...@@ -233,7 +233,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -233,7 +233,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
def test_get_failing_results_dict_webdriver_failing_results_(self): def test_get_failing_results_dict_webdriver_failing_results_(self):
host = self.mock_host() host = self.mock_host()
host.buildbot.set_results(Build('MOCK Try Trusty', 123), WebTestResults({ host.results_fetcher.set_results(Build('MOCK Try Trusty', 123), WebTestResults({
'tests': { 'tests': {
'external': { 'external': {
'wpt': { 'wpt': {
...@@ -249,7 +249,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase): ...@@ -249,7 +249,7 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
}, },
})) }))
host.buildbot.set_webdriver_test_results(Build('MOCK Try Trusty', 123), "tryserver.blink", WebTestResults({ host.results_fetcher.set_webdriver_test_results(Build('MOCK Try Trusty', 123), "tryserver.blink", WebTestResults({
'tests': { 'tests': {
'external': { 'external': {
'wpt': { 'wpt': {
......
...@@ -48,14 +48,14 @@ class BuilderList(object): ...@@ -48,14 +48,14 @@ class BuilderList(object):
Valid values for the version specifier can be found in Valid values for the version specifier can be found in
TestExpectationsParser._configuration_tokens_list, and valid TestExpectationsParser._configuration_tokens_list, and valid
values for the build type specifier include "Release" and "Debug". values for the build type specifier include "Release" and "Debug".
"is_try_builder": Whether the builder is a try bot. "is_try_builder": Whether the builder is a trybot.
"master": The master name of the builder. It is deprecated, but still required "master": The master name of the builder. It is deprecated, but still required
by test-results.appspot.com API." by test-results.appspot.com API."
"has_webdriver_tests": Whether webdriver_tests_suite runs on this builder. "has_webdriver_tests": Whether webdriver_tests_suite runs on this builder.
Possible refactoring note: Potentially, it might make sense to use Possible refactoring note: Potentially, it might make sense to use
blinkpy.common.buildbot.Builder and add port_name and specifiers blinkpy.common.net.results_fetcher.Builder and add port_name and
properties to that class. specifiers properties to that class.
""" """
self._builders = builders_dict self._builders = builders_dict
for builder in builders_dict: for builder in builders_dict:
......
...@@ -118,12 +118,12 @@ class TryFlag(object): ...@@ -118,12 +118,12 @@ class TryFlag(object):
self._host.print_('Fetching results...') self._host.print_('Fetching results...')
# TODO: Get jobs from the _tryflag branch. Current branch for now. # TODO: Get jobs from the _tryflag branch. Current branch for now.
jobs = self._git_cl.latest_try_jobs(builder_names=BUILDER_CONFIGS.keys()) jobs = self._git_cl.latest_try_jobs(builder_names=BUILDER_CONFIGS.keys())
buildbot = self._host.buildbot results_fetcher = self._host.results_fetcher
for build in sorted(jobs): for build in sorted(jobs):
self._host.print_('-- %s: %s/results.html' % ( self._host.print_('-- %s: %s/results.html' % (
BUILDER_CONFIGS[build.builder_name].version, BUILDER_CONFIGS[build.builder_name].version,
buildbot.results_url(build.builder_name, build.build_number))) results_fetcher.results_url(build.builder_name, build.build_number)))
results = buildbot.fetch_results(build, True) results = results_fetcher.fetch_results(build, True)
results.for_each_test( results.for_each_test(
lambda result, b=build: self._process_result(b, result)) lambda result, b=build: self._process_result(b, result))
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
import unittest import unittest
from blinkpy.common.host_mock import MockHost from blinkpy.common.host_mock import MockHost
from blinkpy.common.net.buildbot import Build
from blinkpy.common.net.git_cl import TryJobStatus from blinkpy.common.net.git_cl import TryJobStatus
from blinkpy.common.net.git_cl_mock import MockGitCL from blinkpy.common.net.git_cl_mock import MockGitCL
from blinkpy.common.net.results_fetcher import Build
from blinkpy.common.net.web_test_results import WebTestResults from blinkpy.common.net.web_test_results import WebTestResults
from blinkpy.common.path_finder import PathFinder from blinkpy.common.path_finder import PathFinder
from blinkpy.web_tests.try_flag import TryFlag from blinkpy.web_tests.try_flag import TryFlag
...@@ -68,8 +68,8 @@ class TryFlagTest(unittest.TestCase): ...@@ -68,8 +68,8 @@ class TryFlagTest(unittest.TestCase):
self._run_trigger_test(regenerate=False) self._run_trigger_test(regenerate=False)
self._run_trigger_test(regenerate=True) self._run_trigger_test(regenerate=True)
def _setup_mock_results(self, buildbot): def _setup_mock_results(self, results_fetcher):
buildbot.set_results(self.linux_build, WebTestResults({ results_fetcher.set_results(self.linux_build, WebTestResults({
'tests': { 'tests': {
'something': { 'something': {
'fail-everywhere.html': { 'fail-everywhere.html': {
...@@ -85,7 +85,7 @@ class TryFlagTest(unittest.TestCase): ...@@ -85,7 +85,7 @@ class TryFlagTest(unittest.TestCase):
} }
} }
})) }))
buildbot.set_results(self.win_build, WebTestResults({ results_fetcher.set_results(self.win_build, WebTestResults({
'tests': { 'tests': {
'something': { 'something': {
'fail-everywhere.html': { 'fail-everywhere.html': {
...@@ -101,7 +101,7 @@ class TryFlagTest(unittest.TestCase): ...@@ -101,7 +101,7 @@ class TryFlagTest(unittest.TestCase):
} }
} }
})) }))
buildbot.set_results(self.mac_build, WebTestResults({ results_fetcher.set_results(self.mac_build, WebTestResults({
'tests': { 'tests': {
'something': { 'something': {
'pass-unexpectedly-mac.html': { 'pass-unexpectedly-mac.html': {
...@@ -129,7 +129,7 @@ class TryFlagTest(unittest.TestCase): ...@@ -129,7 +129,7 @@ class TryFlagTest(unittest.TestCase):
flag_expectations_file, flag_expectations_file,
'something/pass-unexpectedly-mac.html [ Fail ]') 'something/pass-unexpectedly-mac.html [ Fail ]')
self._setup_mock_results(host.buildbot) self._setup_mock_results(host.results_fetcher)
cmd = ['update', '--flag=--foo'] cmd = ['update', '--flag=--foo']
TryFlag(cmd, host, MockGitCL(host, self.mock_try_results)).run() TryFlag(cmd, host, MockGitCL(host, self.mock_try_results)).run()
...@@ -163,7 +163,7 @@ class TryFlagTest(unittest.TestCase): ...@@ -163,7 +163,7 @@ class TryFlagTest(unittest.TestCase):
finder = PathFinder(filesystem) finder = PathFinder(filesystem)
flag_expectations_file = finder.path_from_web_tests( flag_expectations_file = finder.path_from_web_tests(
'FlagExpectations', 'foo') 'FlagExpectations', 'foo')
self._setup_mock_results(host.buildbot) self._setup_mock_results(host.results_fetcher)
cmd = ['update', '--flag=--foo'] cmd = ['update', '--flag=--foo']
# Unexpected passes that don't have flag-specific failure expectations # Unexpected passes that don't have flag-specific failure expectations
......
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