Bug 68823 - Add skeleton parsing for a WatchList.
Summary: Add skeleton parsing for a WatchList.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks: 68822
  Show dependency treegraph
 
Reported: 2011-09-26 12:00 PDT by David Levin
Modified: 2011-09-26 16:48 PDT (History)
0 users

See Also:


Attachments
Patch (6.03 KB, patch)
2011-09-26 13:17 PDT, David Levin
no flags Details | Formatted Diff | Diff
Patch (8.52 KB, patch)
2011-09-26 14:14 PDT, David Levin
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2011-09-26 12:00:33 PDT
This will serve as a basis for reading and applying watch lists.
Comment 1 David Levin 2011-09-26 13:17:29 PDT
Created attachment 108716 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-09-26 13:24:10 PDT
Comment on attachment 108716 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=108716&action=review

> Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:34
> +class WatchList:

new-style classes (python 2.5 and above?) always subclass from (object)

> Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:46
> +        # Parse the top level sections in the watch list.
> +        for section in watch_list:
> +            parser = watch_list_parsers.get(section)
> +            if not parse_method:
> +                raise Exception('Unknown section in watch list: %s' % section)
> +            parser(watch_list[section])

I would think you'd want a separate WatchListParser class or Factory class which could produce these, leaving WatchList to just be the model.

> Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:38
> +    def _verifyException(self, regex_message, callable, *args):
> +        try:

Sad. Python 2.7 has something like this in unittest, but pre-2.7 doesn't.
Comment 3 David Levin 2011-09-26 14:14:17 PDT
Created attachment 108720 [details]
Patch
Comment 4 Adam Barth 2011-09-26 14:21:01 PDT
Comment on attachment 108720 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=108720&action=review

> Tools/Scripts/webkitpy/common/watchlist/parsewatchlist.py:36
> +def parse_watch_list(watch_list_contents):

Normally we'd name the package with a noun, so watchlistparser.py
Comment 5 David Levin 2011-09-26 16:48:16 PDT
Committed as http://trac.webkit.org/changeset/95995