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

Unified 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: Add mastername, buildername to GenTest 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipes/find_annotated_tests.py
diff --git a/scripts/slave/recipes/find_annotated_tests.py b/scripts/slave/recipes/find_annotated_tests.py
new file mode 100644
index 0000000000000000000000000000000000000000..31d9d8efbbf3e7792dab140fd0c3b1f0f3e5e5d9
--- /dev/null
+++ b/scripts/slave/recipes/find_annotated_tests.py
@@ -0,0 +1,64 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import datetime
+
+from recipe_engine import recipe_api
+from recipe_engine.recipe_api import Property
+from recipe_engine.types import freeze
+
+DEPS = [
+ 'depot_tools/bot_update',
+ 'depot_tools/gclient',
+ 'file',
+ 'gsutil',
+ 'recipe_engine/python',
+ 'recipe_engine/path',
+ 'recipe_engine/properties',
+ 'recipe_engine/step',
+ 'chromium',
+]
+
+JSON_OUTPUT_DIR = 'annotated_tests_json_temp'
+
+BUCKET_NAME = 'chromium-annotated-tests'
+BUCKET_PATH = 'android'
+
+TEST_APKS = ['ChromePublicApk']
+
+_EXPORT_TIME_FORMAT = '%Y%m%dT%H%M%S'
+
+
+def RunSteps(api):
+ api.chromium.set_config(
+ 'android', BUILD_CONFIG=api.properties.get('configuration', 'Release'))
+ api.gclient.set_config('chromium')
+ api.gclient.apply_config('android')
+ api.bot_update.ensure_checkout()
+ api.gclient.checkout()
+ temp_output_dir = api.path.mkdtemp(JSON_OUTPUT_DIR)
+ script_runtime = datetime.datetime.utcnow()
+ script_runtime_string = script_runtime.strftime(_EXPORT_TIME_FORMAT)
+ api.python(
+ 'run find_annotated_tests.py',
+ api.path['checkout'].join('tools', 'android', 'find_annotated_tests.py'),
+ args = [
+ '--test-apks', ' '.join(TEST_APKS),
+ '--apk-output-dir', api.chromium.output_dir,
+ '--json-output-dir', temp_output_dir,
+ '--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
+ '-v'])
+ api.gsutil.upload(
+ temp_output_dir.join('%s-chrome-android.json' % script_runtime_string),
+ BUCKET_NAME, BUCKET_PATH)
+ api.file.rmtree('Delete temp out directory', temp_output_dir)
+
+
+def GenTests(api):
+ yield (
+ api.test(
+ 'find_annotated_tests_basic') +
+ api.properties.generic(
+ buildername='Chromium Android Find Annotated Tests',
+ mastername='InfraCron'))

Powered by Google App Engine
This is Rietveld 408576698