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

Side by Side Diff: testing/android/generate_native_test.py

Issue 10689102: Copying gdbserver to the apk to enable native debugging for native_test_apk (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Refine the patch Created 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | testing/android/native_test_apk.xml » ('j') | testing/android/native_test_apk.xml » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # On Android we build unit test bundles as shared libraries. To run 6 # On Android we build unit test bundles as shared libraries. To run
7 # tests, we launch a special "test runner" apk which loads the library 7 # tests, we launch a special "test runner" apk which loads the library
8 # then jumps into it. Since java is required for many tests 8 # then jumps into it. Since java is required for many tests
9 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate. 9 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate.
10 # 10 #
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 def Compile(self, ant_args): 139 def Compile(self, ant_args):
140 """Build the generated apk with ant. 140 """Build the generated apk with ant.
141 141
142 Args: 142 Args:
143 ant_args: extra args to pass to ant 143 ant_args: extra args to pass to ant
144 """ 144 """
145 cmd = ['ant'] 145 cmd = ['ant']
146 if ant_args: 146 if ant_args:
147 cmd.append(ant_args) 147 cmd.append(ant_args)
148 cmd.append("-DAPP_ABI=" + self._target_abi)
148 cmd.extend(['-buildfile', 149 cmd.extend(['-buildfile',
149 os.path.join(self._output_directory, 'native_test_apk.xml')]) 150 os.path.join(self._output_directory, 'native_test_apk.xml')])
150 logging.warn(cmd) 151 logging.warn(cmd)
151 p = subprocess.Popen(cmd, stderr=subprocess.STDOUT) 152 p = subprocess.Popen(cmd, stderr=subprocess.STDOUT)
152 (stdout, _) = p.communicate() 153 (stdout, _) = p.communicate()
153 logging.warn(stdout) 154 logging.warn(stdout)
154 if p.returncode != 0: 155 if p.returncode != 0:
155 logging.error('Ant return code %d', p.returncode) 156 logging.error('Ant return code %d', p.returncode)
156 sys.exit(p.returncode) 157 sys.exit(p.returncode)
157 158
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 210
210 if options.ant_compile: 211 if options.ant_compile:
211 ntag.Compile(options.ant_args) 212 ntag.Compile(options.ant_args)
212 else: 213 else:
213 ntag.CompileAndroidMk() 214 ntag.CompileAndroidMk()
214 215
215 logging.warn('COMPLETE.') 216 logging.warn('COMPLETE.')
216 217
217 if __name__ == '__main__': 218 if __name__ == '__main__':
218 sys.exit(main(sys.argv)) 219 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | testing/android/native_test_apk.xml » ('j') | testing/android/native_test_apk.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698