| OLD | NEW |
| 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import sys | 5 import sys |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 | 9 |
| 10 def _AddToPathIfNeeded(path): | 10 def _AddToPathIfNeeded(path): |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 tracing_third_party_path = os.path.join(tracing_root_path, 'third_party') | 68 tracing_third_party_path = os.path.join(tracing_root_path, 'third_party') |
| 69 py_vulcanize_path = os.path.join(catapult_third_party_path, 'py_vulcanize') | 69 py_vulcanize_path = os.path.join(catapult_third_party_path, 'py_vulcanize') |
| 70 vinn_path = os.path.join(catapult_third_party_path, 'vinn') | 70 vinn_path = os.path.join(catapult_third_party_path, 'vinn') |
| 71 | 71 |
| 72 jszip_path = os.path.join(tracing_third_party_path, 'jszip') | 72 jszip_path = os.path.join(tracing_third_party_path, 'jszip') |
| 73 | 73 |
| 74 glmatrix_path = os.path.join( | 74 glmatrix_path = os.path.join( |
| 75 tracing_third_party_path, 'gl-matrix', 'dist') | 75 tracing_third_party_path, 'gl-matrix', 'dist') |
| 76 | 76 |
| 77 mannwhitneyu_path = os.path.join( |
| 78 tracing_third_party_path, 'mannwhitneyu') |
| 79 |
| 77 ui_path = os.path.join(tracing_src_path, 'ui') | 80 ui_path = os.path.join(tracing_src_path, 'ui') |
| 78 d3_path = os.path.join(tracing_third_party_path, 'd3') | 81 d3_path = os.path.join(tracing_third_party_path, 'd3') |
| 79 chai_path = os.path.join(tracing_third_party_path, 'chai') | 82 chai_path = os.path.join(tracing_third_party_path, 'chai') |
| 80 mocha_path = os.path.join(tracing_third_party_path, 'mocha') | 83 mocha_path = os.path.join(tracing_third_party_path, 'mocha') |
| 81 | 84 |
| 82 mre_path = os.path.join(catapult_path, 'perf_insights') | 85 mre_path = os.path.join(catapult_path, 'perf_insights') |
| 83 | 86 |
| 84 metrics_path = os.path.join(tracing_src_path, 'metrics') | 87 metrics_path = os.path.join(tracing_src_path, 'metrics') |
| 85 | 88 |
| 86 value_ui_path = os.path.join(tracing_src_path, 'value', 'ui') | 89 value_ui_path = os.path.join(tracing_src_path, 'value', 'ui') |
| 87 metrics_ui_path = os.path.join(tracing_src_path, 'metrics', 'ui') | 90 metrics_ui_path = os.path.join(tracing_src_path, 'metrics', 'ui') |
| 88 | 91 |
| 89 test_data_path = os.path.join(tracing_root_path, 'test_data') | 92 test_data_path = os.path.join(tracing_root_path, 'test_data') |
| 90 skp_data_path = os.path.join(tracing_root_path, 'skp_data') | 93 skp_data_path = os.path.join(tracing_root_path, 'skp_data') |
| 91 | 94 |
| 92 rjsmin_path = os.path.join( | 95 rjsmin_path = os.path.join( |
| 93 tracing_third_party_path, 'tvcm', 'third_party', 'rjsmin') | 96 tracing_third_party_path, 'tvcm', 'third_party', 'rjsmin') |
| 94 rcssmin_path = os.path.join( | 97 rcssmin_path = os.path.join( |
| 95 tracing_third_party_path, 'tvcm', 'third_party', 'rcssmin') | 98 tracing_third_party_path, 'tvcm', 'third_party', 'rcssmin') |
| 96 | 99 |
| 97 def __init__(self): | 100 def __init__(self): |
| 98 self.source_paths = [] | 101 self.source_paths = [] |
| 99 self.source_paths.append(self.tracing_root_path) | 102 self.source_paths.append(self.tracing_root_path) |
| 100 self.source_paths.append(self.polymer_path) | 103 self.source_paths.append(self.polymer_path) |
| 101 self.source_paths.append(self.tracing_third_party_path) | 104 self.source_paths.append(self.tracing_third_party_path) |
| 102 self.source_paths.append(self.mre_path) | 105 self.source_paths.append(self.mre_path) |
| 103 self.source_paths.append(self.jszip_path) | 106 self.source_paths.append(self.jszip_path) |
| 104 self.source_paths.append(self.glmatrix_path) | 107 self.source_paths.append(self.glmatrix_path) |
| 108 self.source_paths.append(self.mannwhitneyu_path) |
| 105 self.source_paths.append(self.d3_path) | 109 self.source_paths.append(self.d3_path) |
| 106 self.source_paths.append(self.chai_path) | 110 self.source_paths.append(self.chai_path) |
| 107 self.source_paths.append(self.mocha_path) | 111 self.source_paths.append(self.mocha_path) |
| 108 | 112 |
| 109 def CreateVulcanizer(self): | 113 def CreateVulcanizer(self): |
| 110 from py_vulcanize import project as project_module | 114 from py_vulcanize import project as project_module |
| 111 return project_module.Project(self.source_paths) | 115 return project_module.Project(self.source_paths) |
| 112 | 116 |
| 113 def IsD8CompatibleFile(self, filename): | 117 def IsD8CompatibleFile(self, filename): |
| 114 if filename.startswith(self.ui_path): | 118 if filename.startswith(self.ui_path): |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 choices = self.GetConfigNames() | 173 choices = self.GetConfigNames() |
| 170 parser.add_argument( | 174 parser.add_argument( |
| 171 '--config', dest='config_name', | 175 '--config', dest='config_name', |
| 172 choices=choices, default=self.GetDefaultConfigName(), | 176 choices=choices, default=self.GetDefaultConfigName(), |
| 173 help='Picks a browser config. Valid choices: %s' % ', '.join(choices)) | 177 help='Picks a browser config. Valid choices: %s' % ', '.join(choices)) |
| 174 return choices | 178 return choices |
| 175 | 179 |
| 176 def GetModuleNameForConfigName(self, config_name): | 180 def GetModuleNameForConfigName(self, config_name): |
| 177 return 'tracing.ui.extras.%s_config' % config_name | 181 return 'tracing.ui.extras.%s_config' % config_name |
| 178 | 182 |
| OLD | NEW |