Fixed URL unquoting in bot names. Added iOS Device. Removed unnecessary filter code.

BUG=

Review URL: https://webrtc-codereview.appspot.com/1046005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3387 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org 2013-01-18 13:44:21 +00:00
parent c39962aa8d
commit 4ad64458cb
4 changed files with 16 additions and 38 deletions

View File

@ -16,6 +16,7 @@
__author__ = 'phoglund@webrtc.org (Patrik Höglund)'
import re
import urllib
# This is here to work around a buggy build bot status message which makes no
@ -50,7 +51,7 @@ def _parse_builds(revision, html):
BB_084_P1_BUGGY_STATUS + ')'
'.*?</a>.*?</td>',
html, re.DOTALL):
revision_and_bot_name = revision + "--" + match.group(1)
revision_and_bot_name = revision + "--" + urllib.unquote(match.group(1))
build_number_and_status = match.group(2) + "--" + _map_status(
match.group(3))

View File

@ -55,7 +55,6 @@ SAMPLE_FILE = """
<tr>
<td class="title"><a href="http://www.chromium.org">WebRTC</a>
</td>
<td valign="middle" style="text-align: center" class="builder idle">
<a href="builders/Android">Android</a></td>
@ -443,7 +442,7 @@ MINIMAL_OK = """
<tr>
<td valign="bottom" class="sourcestamp">1570 </td>
<td class="build success">
<a href="builders/Android/builds/121">OK</a></td>
<a href="builders/Linux%20Clang%20%5Bstable%5D/builds/121">OK</a></td>
</tr>
"""
@ -451,7 +450,8 @@ MINIMAL_FAIL = """
<tr>
<td valign="bottom" class="sourcestamp">1573 </td>
<td class="build failure">
<a href="builders/LinuxVideoTest/builds/731">failed<br/>voe_auto_test</a>
<a href="builders/Linux%20Large%20Tests/builds/731">failed<br/>voe_auto_test
</a>
</td>
</tr>
"""
@ -512,7 +512,8 @@ class TGridParserTest(unittest.TestCase):
self.assertEqual(1, len(result), 'There is only one bot in the sample.')
first_mapping = result.items()[0]
self.assertEqual('1570--Android', first_mapping[0])
# Note: the parser should unescape % quotations, like %20 for space.
self.assertEqual('1570--Linux Clang [stable]', first_mapping[0])
self.assertEqual('121--OK', first_mapping[1])
def test_parser_finds_failed_bot(self):
@ -521,7 +522,7 @@ class TGridParserTest(unittest.TestCase):
self.assertEqual(1, len(result), 'There is only one bot in the sample.')
first_mapping = result.items()[0]
self.assertEqual('1573--LinuxVideoTest', first_mapping[0])
self.assertEqual('1573--Linux Large Tests', first_mapping[0])
self.assertEqual('731--failed', first_mapping[1])
def test_parser_finds_building_bot(self):

9
tools/quality_tracking/track_build_status.py Normal file → Executable file
View File

@ -89,14 +89,6 @@ def _filter_undesired_bots(bot_to_status_mapping, desired_bot_names):
return result
def _filter_chrome_only_builds(bot_to_status_mapping):
"""Filters chrome-only builds from the system so LKGR doesn't get confused."""
return dict((revision_to_bot_name, status)
for revision_to_bot_name, status
in bot_to_status_mapping.iteritems()
if not _is_chrome_only_build(revision_to_bot_name))
def _main():
dashboard = dashboard_connection.DashboardConnection(constants.CONSUMER_KEY)
dashboard.read_required_files(constants.CONSUMER_SECRET_FILE,
@ -104,7 +96,6 @@ def _main():
bot_to_status_mapping = _download_and_parse_build_status()
bot_to_status_mapping = _filter_undesired_bots(bot_to_status_mapping, BOTS)
bot_to_status_mapping = _filter_chrome_only_builds(bot_to_status_mapping)
dashboard.send_post_request(constants.ADD_BUILD_STATUS_DATA_URL,
bot_to_status_mapping)

31
tools/quality_tracking/track_build_status_test.py Normal file → Executable file
View File

@ -17,35 +17,20 @@ import unittest
import track_build_status
NORMAL_BOT_TO_STATUS_MAPPING = {'1455--ChromeOS': '455--OK',
'1455--Chrome': '900--failed',
'1455--Linux32DBG': '344--OK',
'1456--ChromeOS': '456--OK'}
NORMAL_BOT_TO_STATUS_MAPPING = {
'1455--Win 64 Release': '455--OK',
'1455--CrOS': '900--failed',
'1455--Linux32 Debug': '344--OK',
'1456--Win Large Tests': '456--OK'}
class TrackBuildStatusTest(unittest.TestCase):
def test_that_filter_chrome_only_builds_filter_properly(self):
bot_to_status_mapping = copy.deepcopy(NORMAL_BOT_TO_STATUS_MAPPING)
bot_to_status_mapping['133445--Chrome'] = '901--OK'
bot_to_status_mapping['133441--ChromeBloat'] = '344--OK'
result = track_build_status._filter_chrome_only_builds(
bot_to_status_mapping)
self.assertEquals(NORMAL_BOT_TO_STATUS_MAPPING, result)
def test_ensure_filter_chrome_only_builds_doesnt_filter_too_much(self):
result = track_build_status._filter_chrome_only_builds(
NORMAL_BOT_TO_STATUS_MAPPING)
self.assertEquals(NORMAL_BOT_TO_STATUS_MAPPING, result)
def test_get_desired_bots(self):
bot_to_status_mapping = copy.deepcopy(NORMAL_BOT_TO_STATUS_MAPPING)
desired_bot_names = ['Linux32DBG']
result = track_build_status._get_desired_bots(bot_to_status_mapping,
desired_bot_names)
desired_bot_names = ['Linux32 Debug']
result = track_build_status._filter_undesired_bots(bot_to_status_mapping,
desired_bot_names)
self.assertEquals(1, len(result))
self.assertTrue(desired_bot_names[0] in result.keys()[0])