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

Unified Diff: infra/bots/recipes/swarm_housekeeper.py

Issue 2175373002: Move Skia recipes from build repo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address more comments Created 4 years, 5 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: infra/bots/recipes/swarm_housekeeper.py
diff --git a/infra/bots/recipes/swarm_housekeeper.py b/infra/bots/recipes/swarm_housekeeper.py
new file mode 100644
index 0000000000000000000000000000000000000000..bf9cabbbf98d05035fcdd44599ddc3fecb371cc7
--- /dev/null
+++ b/infra/bots/recipes/swarm_housekeeper.py
@@ -0,0 +1,85 @@
+# Copyright 2014 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.
+
+
+# Recipe for the Skia PerCommit Housekeeper.
+
+
+DEPS = [
+ 'recipe_engine/path',
+ 'recipe_engine/properties',
+ 'recipe_engine/python',
+ 'skia',
+ 'recipe_engine/step',
+]
+
+
+TEST_BUILDERS = {
+ 'client.skia.fyi': {
+ 'skiabot-linux-housekeeper-000': [
+ 'Housekeeper-PerCommit',
+ 'Housekeeper-PerCommit-Trybot',
+ ],
+ },
+}
+
+
+def RunSteps(api):
+ # Checkout, compile, etc.
+ api.skia.setup()
+
+ cwd = api.path['checkout']
+
+ api.skia.run(
+ api.step,
+ 'android platform self-tests',
+ cmd=['python',
+ cwd.join('platform_tools', 'android', 'tests', 'run_all.py')],
+ cwd=cwd,
+ abort_on_failure=False)
+
+ # TODO(borenet): Detect static initializers?
+
+ gsutil_path = api.path['depot_tools'].join('third_party', 'gsutil',
+ 'gsutil')
+ if not api.skia.is_trybot:
+ api.skia.run(
+ api.step,
+ 'generate and upload doxygen',
+ cmd=['python', api.skia.resource('generate_and_upload_doxygen.py'),
+ gsutil_path],
+ cwd=cwd,
+ abort_on_failure=False)
+
+ cmd = ['python', api.skia.resource('run_binary_size_analysis.py'),
+ '--library', api.skia.skia_out.join('Release', 'lib', 'libskia.so'),
+ '--githash', api.properties['revision'],
+ '--gsutil_path', gsutil_path]
+ if api.skia.is_trybot:
+ cmd.extend(['--issue_number', str(api.skia.m.properties['issue'])])
+ api.skia.run(
+ api.step,
+ 'generate and upload binary size data',
+ cmd=cmd,
+ cwd=cwd,
+ abort_on_failure=False)
+
+def GenTests(api):
+ for mastername, slaves in TEST_BUILDERS.iteritems():
+ for slavename, builders_by_slave in slaves.iteritems():
+ for buildername in builders_by_slave:
+ test = (
+ api.test(buildername) +
+ api.properties(buildername=buildername,
+ mastername=mastername,
+ slavename=slavename,
+ buildnumber=5,
+ revision='abc123',
+ path_config='kitchen',
+ swarm_out_dir='[SWARM_OUT_DIR]') +
+ api.path.exists(api.path['slave_build'])
+ )
+ if 'Trybot' in buildername:
+ test.properties['issue'] = '500'
+ yield test

Powered by Google App Engine
This is Rietveld 408576698