summaryrefslogtreecommitdiffstats
path: root/testing/scripts
diff options
context:
space:
mode:
authorPaweł Hajdan, Jr <phajdan.jr@chromium.org>2014-10-27 13:51:08 +0100
committerPaweł Hajdan, Jr <phajdan.jr@chromium.org>2014-10-27 12:52:52 +0000
commit03ee6e03e56adaf08049cc57322d4edc20df76da (patch)
tree902048ec9a856fb0f15e2713e6d56ad64a93f55d /testing/scripts
parentb286ee92e96b67f53a18b510735302190d03cf40 (diff)
downloadchromium_src-03ee6e03e56adaf08049cc57322d4edc20df76da.zip
chromium_src-03ee6e03e56adaf08049cc57322d4edc20df76da.tar.gz
chromium_src-03ee6e03e56adaf08049cc57322d4edc20df76da.tar.bz2
Fix name/path separator for telemetry_unittests test names (src-side)
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}
Diffstat (limited to 'testing/scripts')
-rw-r--r--testing/scripts/common.py4
-rwxr-xr-xtesting/scripts/telemetry_unittests.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/testing/scripts/common.py b/testing/scripts/common.py
index 92ad688..47e7fb7 100644
--- a/testing/scripts/common.py
+++ b/testing/scripts/common.py
@@ -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:
diff --git a/testing/scripts/telemetry_unittests.py b/testing/scripts/telemetry_unittests.py
index c652549..2c68063 100755
--- a/testing/scripts/telemetry_unittests.py
+++ b/testing/scripts/telemetry_unittests.py
@@ -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({