[webkit-reviews] review denied: [Bug 60869] Convert json_results_generator.py to output version 4 JSON. : [Attachment 93603] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 18 18:01:44 PDT 2011
Ojan Vafai <ojan at chromium.org> has denied Alice Boxhall
<aboxhall at chromium.org>'s request for review:
Bug 60869: Convert json_results_generator.py to output version 4 JSON.
https://bugs.webkit.org/show_bug.cgi?id=60869
Attachment 93603: Patch
https://bugs.webkit.org/attachment.cgi?id=93603&action=review
------- Additional Comments from Ojan Vafai <ojan at chromium.org>
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:10
8
> + 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:31
4
> + 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:57
3
> + if len(thisTest) == 0:
if !len(thisTest):
>
Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:60
6
> + try:
> + test_results = results[self.TESTS]
> + except:
> + continue
Why do you need a try/except here?
More information about the webkit-reviews
mailing list