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

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 1923883003: build: use class path bases, not strings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 4 years, 7 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import contextlib 5 import contextlib
6 import datetime 6 import datetime
7 import json 7 import json
8 import os 8 import os
9 import re 9 import re
10 import urllib 10 import urllib
11 11
12 from recipe_engine.types import freeze 12 from recipe_engine.types import freeze
13 from recipe_engine import recipe_api 13 from recipe_engine import recipe_api
14 14
15 15
16 def _TimestampToIsoFormat(timestamp): 16 def _TimestampToIsoFormat(timestamp):
17 return datetime.datetime.utcfromtimestamp(timestamp).strftime('%Y%m%dT%H%M%S') 17 return datetime.datetime.utcfromtimestamp(timestamp).strftime('%Y%m%dT%H%M%S')
18 18
19 19
20 class AndroidApi(recipe_api.RecipeApi): 20 class AndroidApi(recipe_api.RecipeApi):
21 def __init__(self, **kwargs): 21 def __init__(self, **kwargs):
22 super(AndroidApi, self).__init__(**kwargs) 22 super(AndroidApi, self).__init__(**kwargs)
23 self._devices = None 23 self._devices = None
24 self._file_changes_path = None 24 self._file_changes_path = None
25 25
26 def get_config_defaults(self): 26 def get_config_defaults(self):
27 return { 27 return {
28 'REVISION': self.m.properties.get('revision', '') 28 'REVISION': self.m.properties.get('revision', ''),
29 'CHECKOUT_PATH': self.m.path['checkout'],
29 } 30 }
30 31
31 @property 32 @property
32 def devices(self): 33 def devices(self):
33 assert self._devices is not None,\ 34 assert self._devices is not None,\
34 'devices is only available after device_status_check()' 35 'devices is only available after device_status_check()'
35 return self._devices 36 return self._devices
36 37
37 @property 38 @property
38 def out_path(self): 39 def out_path(self):
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 script = self.c.test_runner 1264 script = self.c.test_runner
1264 if wrapper_script_suite_name: 1265 if wrapper_script_suite_name:
1265 script = self.m.chromium.output_dir.join('bin', 'run_%s' % 1266 script = self.m.chromium.output_dir.join('bin', 'run_%s' %
1266 wrapper_script_suite_name) 1267 wrapper_script_suite_name)
1267 else: 1268 else:
1268 env = kwargs.get('env', {}) 1269 env = kwargs.get('env', {})
1269 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', 1270 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR',
1270 self.m.chromium.output_dir) 1271 self.m.chromium.output_dir)
1271 kwargs['env'] = env 1272 kwargs['env'] = env
1272 return self.m.python(step_name, script, args, **kwargs) 1273 return self.m.python(step_name, script, args, **kwargs)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium/config.py ('k') | scripts/slave/recipe_modules/chromium_android/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698