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

Unified Diff: tools/telemetry/telemetry/web_components/web_components_project.py

Issue 418883003: Roll trace-viewer to latest and update telemetry accordingly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more go Created 6 years, 5 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 | « tools/telemetry/telemetry/web_components/viewer_unittest_data.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/web_components/web_components_project.py
diff --git a/tools/telemetry/telemetry/web_components/web_components_project.py b/tools/telemetry/telemetry/web_components/web_components_project.py
index e7b0079a3bfcf5f936e5ea3252bda36360f645ab..5ff6817bfe6b9c60058c61102bedd0741b4e7096 100644
--- a/tools/telemetry/telemetry/web_components/web_components_project.py
+++ b/tools/telemetry/telemetry/web_components/web_components_project.py
@@ -8,14 +8,33 @@ import os
from telemetry.core import util
from trace_viewer import trace_viewer_project
+def _FindAllFilesRecursive(source_paths, pred):
+ all_filenames = set()
+ for source_path in source_paths:
+ for dirpath, _, filenames in os.walk(source_path):
+ for f in filenames:
+ if f.startswith('.'):
+ continue
+ x = os.path.abspath(os.path.join(dirpath, f))
+ if pred(x):
+ all_filenames.add(x)
+ return all_filenames
+
class WebComponentsProject(trace_viewer_project.TraceViewerProject):
telemetry_path = os.path.abspath(util.GetTelemetryDir())
- d3_path = os.path.abspath(os.path.join(
- telemetry_path,
- 'third_party', 'd3'))
+ def __init__(self, *args, **kwargs):
+ super(WebComponentsProject, self).__init__(*args, **kwargs)
+
+ exclude_paths = [os.path.join(self.telemetry_path, 'docs'),
+ os.path.join(self.telemetry_path, 'unittest_data'),
+ os.path.join(self.telemetry_path, 'support')]
+ excluded_html_files = _FindAllFilesRecursive(
+ exclude_paths,
+ lambda x: x.endswith('.html'))
+
+ self.non_module_html_files.extend(excluded_html_files)
+ self.non_module_html_files.appendRel(self.telemetry_path, 'results.html')
- def __init__(self):
- super(WebComponentsProject, self).__init__(
- [self.telemetry_path, self.d3_path])
+ self.source_paths.append(self.telemetry_path)
« no previous file with comments | « tools/telemetry/telemetry/web_components/viewer_unittest_data.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698