Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Unified Diff: scripts/slave/recipe_modules/json/util.py

Issue 674023002: Fix name/path separator for telemetry_unittests test names. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: fix --no-find-copies Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/recipe_modules/json/test_api.py ('k') | scripts/slave/recipes/chromium_trybot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/json/util.py
diff --git a/scripts/slave/recipe_modules/json/util.py b/scripts/slave/recipe_modules/json/util.py
index 1e394348f9a923a2af30f7ca425eead2eac000d1..a6273336231857a7e1107b33260bce2b086e062d 100644
--- a/scripts/slave/recipe_modules/json/util.py
+++ b/scripts/slave/recipe_modules/json/util.py
@@ -1,26 +1,28 @@
-def convert_trie_to_flat_paths(trie, prefix=None):
+def convert_trie_to_flat_paths(trie, prefix, sep):
# Cloned from webkitpy.layout_tests.layout_package.json_results_generator
# so that this code can stand alone.
result = {}
for name, data in trie.iteritems():
if prefix:
- name = prefix + "/" + name
+ name = prefix + sep + name
if len(data) and not "actual" in data and not "expected" in data:
- result.update(convert_trie_to_flat_paths(data, name))
+ result.update(convert_trie_to_flat_paths(data, name, sep))
else:
result[name] = data
return result
-# TODO(phajdan.jr): Rename to LayoutTestResults.
class TestResults(object):
def __init__(self, jsonish=None):
self.raw = jsonish or {}
self.valid = (jsonish is not None)
- self.tests = convert_trie_to_flat_paths(self.raw.get('tests', {}))
+ tests = self.raw.get('tests', {})
+ sep = self.raw.get('path_delimiter', '/')
+ self.tests = convert_trie_to_flat_paths(tests, prefix=None, sep=sep)
+
self.passes = {}
self.unexpected_passes = {}
self.failures = {}
« no previous file with comments | « scripts/slave/recipe_modules/json/test_api.py ('k') | scripts/slave/recipes/chromium_trybot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698