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

Side by Side Diff: infra/bots/recipe_modules/flavor/gn_android_flavor.py

Issue 2340473002: Remove clear /data/local/tmp steps. (Closed)
Patch Set: whoops, both Created 4 years, 3 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
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_test.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 default_flavor 5 import default_flavor
6 import subprocess 6 import subprocess
7 7
8 """GN Android flavor utils, used for building Skia for Android with GN.""" 8 """GN Android flavor utils, used for building Skia for Android with GN."""
9 class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): 9 class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
10 def __init__(self, m): 10 def __init__(self, m):
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }.iteritems())) 56 }.iteritems()))
57 57
58 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), 58 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'),
59 infra_step=True) 59 infra_step=True)
60 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) 60 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args)
61 self._run('ninja', 'ninja', '-C', self.out_dir) 61 self._run('ninja', 'ninja', '-C', self.out_dir)
62 62
63 def install(self): 63 def install(self):
64 self._adb('reboot', 'reboot') 64 self._adb('reboot', 'reboot')
65 self._adb('wait for device', 'wait-for-usb-device') 65 self._adb('wait for device', 'wait-for-usb-device')
66 self._adb('TEMPORARY clear /data/local/tmp',
67 'shell', 'rm', '-rf', '/data/local/tmp/*')
68 self._adb('mkdir /data/local/tmp/resources', 66 self._adb('mkdir /data/local/tmp/resources',
69 'shell', 'mkdir', '-p', '/data/local/tmp/resources') 67 'shell', 'mkdir', '-p', '/data/local/tmp/resources')
70 68
71 def cleanup_steps(self): 69 def cleanup_steps(self):
72 if self._ever_ran_adb: 70 if self._ever_ran_adb:
73 self._adb('TEMPORARY clear /data/local/tmp',
74 'shell', 'rm', '-rf', '/data/local/tmp/*')
75 self._adb('TEMPORARY reboot', 'reboot') 71 self._adb('TEMPORARY reboot', 'reboot')
76 self._adb('kill adb server', 'kill-server') 72 self._adb('kill adb server', 'kill-server')
77 73
78 def step(self, name, cmd, env=None, **kwargs): 74 def step(self, name, cmd, env=None, **kwargs):
79 app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0]) 75 app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0])
80 self._adb('push %s' % cmd[0], 76 self._adb('push %s' % cmd[0],
81 'push', app, '/data/local/tmp') 77 'push', app, '/data/local/tmp')
82 78
83 sh = '%s.sh' % cmd[0] 79 sh = '%s.sh' % cmd[0]
84 self.m.run.writefile(self.m.vars.tmp_dir.join(sh), 80 self.m.run.writefile(self.m.vars.tmp_dir.join(sh),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 def read_file_on_device(self, path): 122 def read_file_on_device(self, path):
127 return self._adb('read %s' % path, 123 return self._adb('read %s' % path,
128 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout 124 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout
129 125
130 def remove_file_on_device(self, path): 126 def remove_file_on_device(self, path):
131 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) 127 self._adb('rm %s' % path, 'shell', 'rm', '-f', path)
132 128
133 def create_clean_device_dir(self, path): 129 def create_clean_device_dir(self, path):
134 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) 130 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path)
135 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) 131 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path)
OLDNEW
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_test.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698