| 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)
|
|
|