| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 jszip_path = os.path.join(tracing_third_party_path, 'jszip') | 71 jszip_path = os.path.join(tracing_third_party_path, 'jszip') |
| 72 | 72 |
| 73 glmatrix_path = os.path.join( | 73 glmatrix_path = os.path.join( |
| 74 tracing_third_party_path, 'gl-matrix', 'dist') | 74 tracing_third_party_path, 'gl-matrix', 'dist') |
| 75 | 75 |
| 76 ui_path = os.path.join(tracing_src_path, 'ui') | 76 ui_path = os.path.join(tracing_src_path, 'ui') |
| 77 d3_path = os.path.join(tracing_third_party_path, 'd3') | 77 d3_path = os.path.join(tracing_third_party_path, 'd3') |
| 78 chai_path = os.path.join(tracing_third_party_path, 'chai') | 78 chai_path = os.path.join(tracing_third_party_path, 'chai') |
| 79 mocha_path = os.path.join(tracing_third_party_path, 'mocha') | 79 mocha_path = os.path.join(tracing_third_party_path, 'mocha') |
| 80 | 80 |
| 81 mre_path = os.path.join(catapult_path, 'perf_insights') |
| 82 |
| 81 value_ui_path = os.path.join(tracing_src_path, 'value', 'ui') | 83 value_ui_path = os.path.join(tracing_src_path, 'value', 'ui') |
| 82 metrics_ui_path = os.path.join(tracing_src_path, 'metrics', 'ui') | 84 metrics_ui_path = os.path.join(tracing_src_path, 'metrics', 'ui') |
| 83 | 85 |
| 84 test_data_path = os.path.join(tracing_root_path, 'test_data') | 86 test_data_path = os.path.join(tracing_root_path, 'test_data') |
| 85 skp_data_path = os.path.join(tracing_root_path, 'skp_data') | 87 skp_data_path = os.path.join(tracing_root_path, 'skp_data') |
| 86 | 88 |
| 87 rjsmin_path = os.path.join( | 89 rjsmin_path = os.path.join( |
| 88 tracing_third_party_path, 'tvcm', 'third_party', 'rjsmin') | 90 tracing_third_party_path, 'tvcm', 'third_party', 'rjsmin') |
| 89 rcssmin_path = os.path.join( | 91 rcssmin_path = os.path.join( |
| 90 tracing_third_party_path, 'tvcm', 'third_party', 'rcssmin') | 92 tracing_third_party_path, 'tvcm', 'third_party', 'rcssmin') |
| 91 | 93 |
| 92 def __init__(self): | 94 def __init__(self): |
| 93 self.source_paths = [] | 95 self.source_paths = [] |
| 94 self.source_paths.append(self.tracing_root_path) | 96 self.source_paths.append(self.tracing_root_path) |
| 95 self.source_paths.append(self.tracing_third_party_path) | 97 self.source_paths.append(self.tracing_third_party_path) |
| 98 self.source_paths.append(self.mre_path) |
| 96 self.source_paths.append(self.jszip_path) | 99 self.source_paths.append(self.jszip_path) |
| 97 self.source_paths.append(self.glmatrix_path) | 100 self.source_paths.append(self.glmatrix_path) |
| 98 self.source_paths.append(self.d3_path) | 101 self.source_paths.append(self.d3_path) |
| 99 self.source_paths.append(self.chai_path) | 102 self.source_paths.append(self.chai_path) |
| 100 self.source_paths.append(self.mocha_path) | 103 self.source_paths.append(self.mocha_path) |
| 101 | 104 |
| 102 def CreateVulcanizer(self): | 105 def CreateVulcanizer(self): |
| 103 from py_vulcanize import project as project_module | 106 from py_vulcanize import project as project_module |
| 104 return project_module.Project(self.source_paths) | 107 return project_module.Project(self.source_paths) |
| 105 | 108 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 choices = self.GetConfigNames() | 155 choices = self.GetConfigNames() |
| 153 parser.add_argument( | 156 parser.add_argument( |
| 154 '--config', dest='config_name', | 157 '--config', dest='config_name', |
| 155 choices=choices, default=self.GetDefaultConfigName(), | 158 choices=choices, default=self.GetDefaultConfigName(), |
| 156 help='Picks a browser config. Valid choices: %s' % ', '.join(choices)) | 159 help='Picks a browser config. Valid choices: %s' % ', '.join(choices)) |
| 157 return choices | 160 return choices |
| 158 | 161 |
| 159 def GetModuleNameForConfigName(self, config_name): | 162 def GetModuleNameForConfigName(self, config_name): |
| 160 return 'tracing.ui.extras.%s_config' % config_name | 163 return 'tracing.ui.extras.%s_config' % config_name |
| 161 | 164 |
| OLD | NEW |