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

Unified Diff: infra/bots/common.py

Issue 1768273002: Swarming bots: add build products whitelist (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/common.py
diff --git a/infra/bots/common.py b/infra/bots/common.py
index 31f1f824af42a65814aafd896ba6c547446c44dd..5900090dafdf8359639a622d6f6bab740abd9ede 100644
--- a/infra/bots/common.py
+++ b/infra/bots/common.py
@@ -31,6 +31,11 @@ CONFIG_DEBUG = 'Debug'
CONFIG_RELEASE = 'Release'
VALID_CONFIGS = (CONFIG_COVERAGE, CONFIG_DEBUG, CONFIG_RELEASE)
+BUILD_PRODUCTS_WHITELIST = [
+ 'dm', 'dm.exe',
+ 'nanobench', 'nanobench.exe',
+]
+
GM_ACTUAL_FILENAME = 'actual-results.json'
GM_EXPECTATIONS_FILENAME = 'expected-results.json'
GM_IGNORE_TESTS_FILENAME = 'ignored-tests.txt'
@@ -154,10 +159,7 @@ class BotInfo(object):
self.build_dir = os.path.abspath(os.path.join(self.skia_dir, os.pardir))
self.spec = self.get_bot_spec(bot_name)
self.bot_cfg = self.spec['builder_cfg']
- if self.bot_cfg['role'] == 'Build':
- self.out_dir = os.path.join(swarm_out_dir, 'out')
- else:
- self.out_dir = os.path.join(os.pardir, 'out')
+ self.out_dir = os.path.join(os.pardir, 'out')
self.configuration = self.spec['configuration']
self.default_env = {
'SKIA_OUT': self.out_dir,
@@ -242,6 +244,13 @@ class BotInfo(object):
def compile_steps(self):
for t in self.build_targets:
self.flavor.compile(t)
+ dst = os.path.join(self.swarm_out_dir, 'out', self.configuration)
+ os.makedirs(dst)
+ for f in BUILD_PRODUCTS_WHITELIST:
+ path = os.path.join(self.out_dir, self.configuration, f)
+ if os.path.exists(path):
+ print 'Copying build product %s' % path
+ shutil.copy(path, dst)
def _run_once(self, fn, *args, **kwargs):
if not fn.__name__ in self._already_ran:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698