| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """ | 6 """ |
| 7 cr_cronet.py - cr - like helper tool for cronet developers | 7 cr_cronet.py - cr - like helper tool for cronet developers |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 def debug(extra_options): | 38 def debug(extra_options): |
| 39 return run('build/android/adb_gdb --start ' + \ | 39 return run('build/android/adb_gdb --start ' + \ |
| 40 '--activity=.CronetTestActivity ' + \ | 40 '--activity=.CronetTestActivity ' + \ |
| 41 '--program-name=CronetTest ' + \ | 41 '--program-name=CronetTest ' + \ |
| 42 '--package-name=org.chromium.net', | 42 '--package-name=org.chromium.net', |
| 43 extra_options) | 43 extra_options) |
| 44 | 44 |
| 45 | 45 |
| 46 def stack(out_dir): | 46 def stack(out_dir): |
| 47 return run('adb logcat -d | third_party/android_tools/ndk/ndk-stack ' + \ | 47 return run('adb logcat -d | CHROMIUM_OUTPUT_DIR=' + out_dir + |
| 48 '-sym ' + out_dir + '/lib') | 48 ' third_party/android_platform/development/scripts/stack') |
| 49 | |
| 50 | 49 |
| 51 def main(): | 50 def main(): |
| 52 parser = argparse.ArgumentParser() | 51 parser = argparse.ArgumentParser() |
| 53 parser.add_argument('command', | 52 parser.add_argument('command', |
| 54 choices=['gyp', | 53 choices=['gyp', |
| 55 'gn', | 54 'gn', |
| 56 'sync', | 55 'sync', |
| 57 'build', | 56 'build', |
| 58 'install', | 57 'install', |
| 59 'proguard', | 58 'proguard', |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return install(release_arg) or debug(extra_options) | 104 return install(release_arg) or debug(extra_options) |
| 106 if (options.command=='build-debug'): | 105 if (options.command=='build-debug'): |
| 107 return build(out_dir) or install(release_arg) or debug(extra_options) | 106 return build(out_dir) or install(release_arg) or debug(extra_options) |
| 108 | 107 |
| 109 parser.print_help() | 108 parser.print_help() |
| 110 return 1 | 109 return 1 |
| 111 | 110 |
| 112 | 111 |
| 113 if __name__ == '__main__': | 112 if __name__ == '__main__': |
| 114 sys.exit(main()) | 113 sys.exit(main()) |
| OLD | NEW |