Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import datetime | |
| 6 | |
| 7 from recipe_engine import recipe_api | |
| 8 from recipe_engine.recipe_api import Property | |
| 9 from recipe_engine.types import freeze | |
| 10 | |
| 11 DEPS = [ | |
| 12 'depot_tools/bot_update', | |
| 13 'depot_tools/gclient', | |
| 14 'file', | |
| 15 'gsutil', | |
| 16 'recipe_engine/python', | |
| 17 'recipe_engine/path', | |
| 18 'recipe_engine/properties', | |
| 19 'recipe_engine/step', | |
| 20 'chromium', | |
| 21 ] | |
| 22 | |
| 23 JSON_OUTPUT_DIR = 'annotated_tests_json_temp' | |
| 24 | |
| 25 BUCKET_NAME = 'chromium-annotated-tests' | |
| 26 BUCKET_PATH = 'android' | |
| 27 | |
| 28 TEST_APKS = ['ChromePublicApk'] | |
| 29 | |
| 30 _EXPORT_TIME_FORMAT = '%Y%m%dT%H%M%S' | |
| 31 | |
| 32 | |
| 33 def RunSteps(api): | |
| 34 api.chromium.set_config( | |
| 35 'android', BUILD_CONFIG=api.properties.get('configuration', 'Release')) | |
| 36 api.gclient.set_config('chromium') | |
| 37 api.gclient.apply_config('android') | |
| 38 api.bot_update.ensure_checkout() | |
| 39 api.gclient.checkout() | |
| 40 temp_output_dir = api.path.mkdtemp(JSON_OUTPUT_DIR) | |
| 41 script_runtime = datetime.datetime.utcnow() | |
| 42 script_runtime_string = script_runtime.strftime(_EXPORT_TIME_FORMAT) | |
| 43 api.python( | |
| 44 'run find_annotated_tests.py', | |
| 45 api.path['checkout'].join('tools', 'android', 'find_annotated_tests.py'), | |
| 46 args = [ | |
| 47 '--test-apks', ' '.join(TEST_APKS), | |
| 48 '--apk-output-dir', api.chromium.output_dir, | |
| 49 '--json-output-dir', temp_output_dir, | |
| 50 '--script_runtime_string', script_runtime_string, | |
|
mikecase (-- gone --)
2016/06/14 22:22:50
nit: Chnage to same format as everything else.
sc
the real yoland
2016/06/14 23:27:15
Done
| |
| 51 '-v']) | |
| 52 api.gsutil.upload( | |
| 53 temp_output_dir.join('%s-chrome-android.json' % script_runtime_string), | |
| 54 BUCKET_NAME, BUCKET_PATH) | |
| 55 api.file.rmtree('Delete temp out directory', temp_output_dir) | |
| 56 | |
| 57 | |
| 58 def GenTests(api): | |
| 59 yield ( | |
| 60 api.test( | |
| 61 'find_annotated_tests_basic') + | |
| 62 api.properties.generic( | |
| 63 buildername='Chromium Android Find Annotated Tests', | |
| 64 mastername='InfraCron')) | |
| OLD | NEW |