Skip to content

Commit

Permalink
Fix name/path separator for telemetry_unittests test names (src-side)
Browse files Browse the repository at this point in the history
This ports https://codereview.chromium.org/674023002 to src-side script.

BUG=399371, 425694, 422235
R=sergiyb@chromium.org

Review URL: https://codereview.chromium.org/677393002

Cr-Commit-Position: refs/heads/master@{#301351}
  • Loading branch information
Paweł Hajdan, Jr committed Oct 27, 2014
1 parent b286ee9 commit 03ee6e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions testing/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def temporary_file():
os.remove(path)


def parse_common_test_results(json_results):
def parse_common_test_results(json_results, test_separator='/'):
def convert_trie_to_flat_paths(trie, prefix=None):
# Also see webkitpy.layout_tests.layout_package.json_results_generator
result = {}
for name, data in trie.iteritems():
if prefix:
name = prefix + '/' + name
name = prefix + test_separator + name
if len(data) and not 'actual' in data and not 'expected' in data:
result.update(convert_trie_to_flat_paths(data, name))
else:
Expand Down
2 changes: 1 addition & 1 deletion testing/scripts/telemetry_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def main_run(args):
with open(tempfile_path) as f:
results = json.load(f)

parsed_results = common.parse_common_test_results(results)
parsed_results = common.parse_common_test_results(results, test_separator='.')
failures = parsed_results['unexpected_failures']

json.dump({
Expand Down

0 comments on commit 03ee6e0

Please sign in to comment.