Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 contextlib | 5 import contextlib |
| 6 import datetime | 6 import datetime |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import pipes | 9 import pipes |
| 10 import re | 10 import re |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1230 is_cts_v2 = (android_platform == 'N') | 1230 is_cts_v2 = (android_platform == 'N') |
| 1231 | 1231 |
| 1232 suffix = ' (%s)' % suffix if suffix else '' | 1232 suffix = ' (%s)' % suffix if suffix else '' |
| 1233 if command_line_args: | 1233 if command_line_args: |
| 1234 self._set_webview_command_line(command_line_args) | 1234 self._set_webview_command_line(command_line_args) |
| 1235 | 1235 |
| 1236 _CTS_CONFIG_SRC_PATH = self.m.path['checkout'].join( | 1236 _CTS_CONFIG_SRC_PATH = self.m.path['checkout'].join( |
| 1237 'android_webview', 'tools', 'cts_config') | 1237 'android_webview', 'tools', 'cts_config') |
| 1238 cts_filenames_json = self.m.file.read( | 1238 cts_filenames_json = self.m.file.read( |
| 1239 'Fetch CTS filename data', | 1239 'Fetch CTS filename data', |
| 1240 _CTS_CONFIG_SRC_PATH.join('webview_cts_gcs_path.json'), | 1240 _CTS_CONFIG_SRC_PATH.join('webview_cts_gcs_path_new.json'), |
| 1241 test_data=''' | 1241 test_data=''' |
| 1242 { | 1242 { |
| 1243 "arm_64": { | 1243 "arm_64": { |
| 1244 "L": "cts_arm64_L.zip" | 1244 "L": { |
| 1245 "filename": "cts_arm64_L.zip", | |
| 1246 "_origin": "aosp-lollipop-mr1-cts-dev@12345" | |
| 1247 }, | |
| 1248 "N": { | |
| 1249 "filename": "cts_arm64_N.zip", | |
| 1250 "_origin": "aosp-nougat-cts-release@67890" | |
| 1251 } | |
| 1245 } | 1252 } |
| 1246 }''') | 1253 }''') |
| 1247 cts_filenames = self.m.json.loads(cts_filenames_json) | 1254 cts_filenames = self.m.json.loads(cts_filenames_json) |
| 1255 result = self.m.step.active_result | |
| 1256 result.presentation.logs['webview_cts_gcs_path.json'] = ( | |
| 1257 cts_filenames_json.split('\n')) | |
|
mikecase (-- gone --)
2016/10/27 15:54:09
nit: split('\n') --> splitlines()
| |
| 1248 try: | 1258 try: |
| 1249 cts_filename = cts_filenames[arch][android_platform] | 1259 cts_filename = cts_filenames[arch][android_platform]["filename"] |
| 1250 except KeyError: | 1260 except KeyError: |
| 1251 raise self.m.step.StepFailure( | 1261 raise self.m.step.StepFailure( |
| 1252 'No CTS test found to use for arch:%s android:%s' % ( | 1262 'No CTS test found to use for arch:%s android:%s' % ( |
| 1253 arch, android_platform)) | 1263 arch, android_platform)) |
| 1254 | 1264 |
| 1255 expected_failure_json = self.m.file.read( | 1265 expected_failure_json = self.m.file.read( |
| 1256 'Fetch expected failures data', | 1266 'Fetch expected failures data', |
| 1257 _CTS_CONFIG_SRC_PATH.join('expected_failure_on_bot.json'), | 1267 _CTS_CONFIG_SRC_PATH.join('expected_failure_on_bot.json'), |
| 1258 test_data = ''' | 1268 test_data = ''' |
| 1259 { | 1269 { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1566 script = self.c.test_runner | 1576 script = self.c.test_runner |
| 1567 if wrapper_script_suite_name: | 1577 if wrapper_script_suite_name: |
| 1568 script = self.m.chromium.output_dir.join('bin', 'run_%s' % | 1578 script = self.m.chromium.output_dir.join('bin', 'run_%s' % |
| 1569 wrapper_script_suite_name) | 1579 wrapper_script_suite_name) |
| 1570 else: | 1580 else: |
| 1571 env = kwargs.get('env', {}) | 1581 env = kwargs.get('env', {}) |
| 1572 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', | 1582 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', |
| 1573 self.m.chromium.output_dir) | 1583 self.m.chromium.output_dir) |
| 1574 kwargs['env'] = env | 1584 kwargs['env'] = env |
| 1575 return self.m.python(step_name, script, args, **kwargs) | 1585 return self.m.python(step_name, script, args, **kwargs) |
| OLD | NEW |