[Webkit-unassigned] [Bug 60869] Convert json_results_generator.py to output version 4 JSON.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 18 18:01:44 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60869


Ojan Vafai <ojan at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93603|review?                     |review-
               Flag|                            |




--- Comment #2 from Ojan Vafai <ojan at chromium.org>  2011-05-18 18:01:44 PST ---
(From update of attachment 93603)
View in context: https://bugs.webkit.org/attachment.cgi?id=93603&action=review

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:88
> +            if not isinstance(data, dict) or len(data) == 0 or "results" in data:

Do we ever hit cases in practice where data is not a dict or where len(data) == 0?

Also, !len(data) is preferred to checking if it's equal to zero in WebKit code.

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:96
> +def convert_flat_path_to_trie(path, value, trie):

nit: Maybe just call this add_path_to_trie? It's not really converting anything to a trie.

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:108
> +    directory, _, rest = path.partition("/")

Would be good to name the middle variable even if it's unused. Just to know what's going on.

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:314
> +        all_failing_tests_trie = {}
> +        for test in all_failing_tests:
> +            convert_flat_path_to_trie(test, {}, all_failing_tests_trie)
> +
> +        all_failing_tests.update(convert_trie_to_flat_paths(tests))

I don't understand what this is doing. Sorry, I tried to figure it out.

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:573
> +        if len(thisTest) == 0:

if !len(thisTest):

> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:606
> +                try:
> +                    test_results = results[self.TESTS]
> +                except:
> +                    continue

Why do you need a try/except here?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list