예제 #1
0
 def test_fetch_results_with_weird_step_name(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(
         urls={
             'https://test-results.appspot.com/testfile?buildnumber=123&'
             'callback=ADD_RESULTS&builder=builder&name=full_results.json':
             'ADD_RESULTS(%s);' %
             (json.dumps([{
                 "TestType":
                 "webkit_layout_tests on Intel GPU (with patch)"
             }, {
                 "TestType": "base_unittests (with patch)"
             }])),
             'https://test-results.appspot.com/data/layout_results/builder/123/'
             'webkit_layout_tests%20on%20Intel%20GPU%20%28with%20patch%29/'
             'layout-test-results/failing_results.json':
             json.dumps({'passed': True}),
         })
     results = buildbot.fetch_results(Build('builder', 123))
     self.assertEqual(
         results._results,
         {  # pylint: disable=protected-access
             'passed': True
         })
     self.assertLog([])
예제 #2
0
 def test_fetch_web_test_results_with_no_results_fetched(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb()
     results = buildbot.fetch_web_test_results(buildbot.results_url('B'))
     self.assertIsNone(results)
     self.assertLog([
         'DEBUG: Got 404 response from:\n'
         'https://test-results.appspot.com/data/layout_results/B/results/layout-test-results/failing_results.json\n'
     ])
예제 #3
0
 def test_fetch_webdriver_test_results_with_no_results(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb()
     results = buildbot.fetch_webdriver_test_results(
         Build('linux-rel', 123), 'tryserver.chromium.linux')
     self.assertIsNone(results)
     self.assertLog([
         'DEBUG: Got 404 response from:\n'
         'https://test-results.appspot.com/testfile?buildnumber=123&'
         'master=tryserver.chromium.linux&builder=linux-rel&'
         'testtype=webdriver_tests_suite+%28with+patch%29&name=full_results.json\n'
     ])
예제 #4
0
 def test_get_step_name(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(urls={
         'https://test-results.appspot.com/testfile?buildnumber=5&'
         'callback=ADD_RESULTS&builder=foo&name=full_results.json':
             'ADD_RESULTS(%s);' % (json.dumps(
                 [{"TestType": "webkit_layout_tests (with patch)"},
                  {"TestType": "not_site_per_process_webkit_layout_tests (with patch)"},
                  {"TestType": "webkit_layout_tests (retry with patch)"},
                  {"TestType": "base_unittests (with patch)"}]))
     })
     step_name = buildbot.get_layout_test_step_name(Build('foo', 5))
     self.assertEqual(step_name, 'webkit_layout_tests (with patch)')
     self.assertLog([])
예제 #5
0
 def test_fetch_webdriver_results_success(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(urls={
         'https://test-results.appspot.com/testfile?buildnumber=123&'
         'master=foo.chrome&builder=bar-rel&'
         'testtype=webdriver_tests_suite+%28with+patch%29&'
         'name=full_results.json':
             json.dumps({'passed': True}),
     })
     results = buildbot.fetch_webdriver_test_results(
         Build('bar-rel', 123), 'foo.chrome')
     self.assertEqual(results._results, {  # pylint: disable=protected-access
         'passed': True
     })
     self.assertLog([])
예제 #6
0
 def test_fetch_full_results_webdriver(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(
         urls={
             'https://test-results.appspot.com/testfile?buildnumber=321&'
             'master=tryserver.chromium.linux&builder=foo&'
             'testtype=webdriver_tests_suite+%28with+patch%29&'
             'name=full_results.json':
             json.dumps({'passed': True}),
         })
     results = buildbot.fetch_full_results(
         Build('foo', 321), master='tryserver.chromium.linux')
     self.assertEqual(
         results._results,
         {  # pylint: disable=protected-access
             'passed': True
         })
     self.assertLog([])