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

Unified Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2174883002: [Android] Root devices before asan_device_setup.sh. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: 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
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/full_chromium_fyi_ClangToTAndroidASan_tester.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium_android/api.py
diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py
index 15b38604ee846e21bf16ca5de3a06f1d7945c1e1..fbfec8e17be6e2345d98e4734bab22c907cf8e2d 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -561,34 +561,37 @@ class AndroidApi(recipe_api.RecipeApi):
infra_step=True,
env=self.m.chromium.get_env())
- def _asan_device_setup(self, name, args):
+ def _asan_device_setup(self, args):
script = self.m.path['checkout'].join(
'tools', 'android', 'asan', 'third_party', 'asan_device_setup.sh')
cmd = [script] + args
env = dict(self.m.chromium.get_env())
env['ADB'] = self.m.adb.adb_path()
for d in self.devices:
- self.m.step('%s %s' % (name, d),
+ self.m.step(d,
cmd + ['--device', d],
infra_step=True,
env=env)
def asan_device_setup(self):
- args = [
- '--lib',
- self.m.path['checkout'].join(
- 'third_party', 'llvm-build', 'Release+Asserts', 'lib', 'clang',
- # TODO(kjellander): Don't hardcode the clang version number here,
- # else the bot will break every time it changes. Instead,
- # get it from `tools/clang/scripts/update.py --print-clang-version`,
- # then the version can be updated atomically with a src-side change
- # in clang rolls, instead of it being both in src/ and build/.
- '3.9.0', 'lib', 'linux', 'libclang_rt.asan-arm-android.so')
- ]
- self._asan_device_setup('Set up ASAN on device', args)
+ with self.m.step.nest('Set up ASAN on devices'):
+ self.m.adb.root_devices()
+ args = [
+ '--lib',
+ self.m.path['checkout'].join(
+ 'third_party', 'llvm-build', 'Release+Asserts', 'lib', 'clang',
+ # TODO(kjellander): Don't hardcode the clang version number here,
+ # else the bot will break every time it changes. Instead,
+ # get it from `tools/clang/scripts/update.py --print-clang-version`,
+ # then the version can be updated atomically with a src-side change
+ # in clang rolls, instead of it being both in src/ and build/.
+ '3.9.0', 'lib', 'linux', 'libclang_rt.asan-arm-android.so')
+ ]
+ self._asan_device_setup(args)
def asan_device_teardown(self):
- self._asan_device_setup('Tear down ASAN on device', ['--revert'])
+ with self.m.step.nest('Tear down ASAN on devices'):
+ self._asan_device_setup(['--revert'])
def monkey_test(self, **kwargs):
args = [
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/full_chromium_fyi_ClangToTAndroidASan_tester.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698