def test_get_step_name(self): buildbot = BuildBot() def fetch_file(_): return ('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)"}]))) buildbot.fetch_file = fetch_file step_name = buildbot.get_layout_test_step_name(Build('foo', 5)) self.assertEqual(step_name, 'webkit_layout_tests (with patch)') self.assertLog([])
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([])
def test_get_step_name_without_build_number(self): buildbot = BuildBot() self.assertIsNone( buildbot.get_layout_test_step_name(Build('builder', None)))