Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: scripts/slave/recipes/find_annotated_tests.py

Issue 2063323002: Create recipe to run find_annotated_tests.py periodically (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Change after mike's comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
jbudorick 2016/06/20 09:28:26 This should almost certainly be in android/ given
the real yoland 2016/06/21 23:16:08 Done
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 = {
29 'android_webview_test_apk': 'AndroidWebViewTest',
30 'blimp_test_apk': 'BlimpTest',
31 'chrome_public_test_apk': 'ChromePublicTest',
32 'chrome_sync_shell_test_apk': 'ChromeSyncShellTest',
33 'components_browsertests_apk': 'ComponentsBrowserTests',
34 'content_browsertests_apk': 'ContentBrowserTests',
35 'content_shell_test_apk': 'ContentShellTest',
36 'system_webview_shell_layout_test_apk': 'SystemWebViewShellLayoutTest',
mikecase (-- gone --) 2016/06/14 23:43:37 I think you want to remove components_browsertests
jbudorick 2016/06/20 09:28:26 Yeah, you're not going to find any java tests in t
the real yoland 2016/06/21 23:16:08 Got it!
37 }
mikecase (-- gone --) 2016/06/14 23:43:37 nit: I dont think this should be indented.
the real yoland 2016/06/21 23:16:08 Done
38
39 _EXPORT_TIME_FORMAT = '%Y%m%dT%H%M%S'
40
41
42 def RunSteps(api):
jbudorick 2016/06/20 09:28:26 I'm not convinced that this needs to be its own re
the real yoland 2016/06/21 23:16:08 The problem with that is I only need this to run a
jbudorick 2016/06/22 10:21:37 To clarify, I'm not saying this shouldn't be it's
43 api.chromium.set_config(
44 'android', BUILD_CONFIG=api.properties.get('configuration', 'Release'))
45 api.gclient.set_config('chromium')
46 api.gclient.apply_config('android')
47 api.bot_update.ensure_checkout()
48 api.gclient.checkout()
49 api.chromium.compile(TEST_APKS.iterkeys())
50 try:
51 temp_output_dir = api.path.mkdtemp(JSON_OUTPUT_DIR)
52 script_runtime = datetime.datetime.utcnow()
53 script_runtime_string = script_runtime.strftime(_EXPORT_TIME_FORMAT)
54 api.python(
55 'run find_annotated_tests.py',
56 api.path['checkout'].join(
57 'tools', 'android', 'find_annotated_tests.py'),
mikecase (-- gone --) 2016/06/14 23:43:37 nit: I think this needs to be indented 2 more spac
the real yoland 2016/06/21 23:16:08 Done
58 args = [
59 '--test-apks', ' '.join(TEST_APKS.itervalues()),
mikecase (-- gone --) 2016/06/14 23:43:37 These don't have the .apk extension. Is this what
the real yoland 2016/06/21 23:16:08 Ya, the script add the extensions
60 '--apk-output-dir', api.chromium.output_dir,
61 '--json-output-dir', temp_output_dir,
62 '--script-runtime-string', script_runtime_string,
63 '-v'])
64 api.gsutil.upload(
65 temp_output_dir.join('%s-android-chrome.json' % script_runtime_string),
66 BUCKET_NAME, BUCKET_PATH)
67 finally:
68 api.file.rmtree('Delete temp out directory', temp_output_dir)
69
70
71 def GenTests(api):
72 yield (
73 api.test(
74 'find_annotated_tests_basic') +
mikecase (-- gone --) 2016/06/14 23:43:37 nit: think this should be indented 2 more spaces
the real yoland 2016/06/21 23:16:08 Done
75 api.properties.generic(
76 buildername='Chromium Android Find Annotated Tests',
mikecase (-- gone --) 2016/06/14 23:43:37 nit: think this should be indented 2 more spaces.
the real yoland 2016/06/21 23:16:08 Done
77 mastername='InfraCron'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698