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 18 matching lines...) Expand all Loading... |
29 def test(release_arg, extra_options): | 29 def test(release_arg, extra_options): |
30 return run ('build/android/test_runner.py instrumentation '+ \ | 30 return run ('build/android/test_runner.py instrumentation '+ \ |
31 release_arg + ' --test-apk=CronetTestInstrumentation ' + \ | 31 release_arg + ' --test-apk=CronetTestInstrumentation ' + \ |
32 extra_options) | 32 extra_options) |
33 | 33 |
34 | 34 |
35 def debug(extra_options): | 35 def debug(extra_options): |
36 return run ('build/android/adb_gdb --start ' + \ | 36 return run ('build/android/adb_gdb --start ' + \ |
37 '--activity=.CronetTestActivity ' + \ | 37 '--activity=.CronetTestActivity ' + \ |
38 '--program-name=CronetTest ' + \ | 38 '--program-name=CronetTest ' + \ |
39 '--package-name=org.chromium.cronet_test_apk ' + \ | 39 '--package-name=org.chromium.net ' + \ |
40 ' '.join(extra_options)) | 40 ' '.join(extra_options)) |
41 | 41 |
42 | 42 |
43 def stack(out_dir): | 43 def stack(out_dir): |
44 return run ('adb logcat -d | third_party/android_tools/ndk/ndk-stack ' + \ | 44 return run ('adb logcat -d | third_party/android_tools/ndk/ndk-stack ' + \ |
45 '-sym ' + out_dir + '/lib') | 45 '-sym ' + out_dir + '/lib') |
46 | 46 |
47 | 47 |
48 def main(): | 48 def main(): |
49 parser = argparse.ArgumentParser() | 49 parser = argparse.ArgumentParser() |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return install(release_arg) or debug(extra_options) | 95 return install(release_arg) or debug(extra_options) |
96 if (options.command=='build-debug'): | 96 if (options.command=='build-debug'): |
97 return build(out_dir) or install(release_arg) or debug(extra_options) | 97 return build(out_dir) or install(release_arg) or debug(extra_options) |
98 | 98 |
99 parser.print_help() | 99 parser.print_help() |
100 return 1 | 100 return 1 |
101 | 101 |
102 | 102 |
103 if __name__ == '__main__': | 103 if __name__ == '__main__': |
104 sys.exit(main()) | 104 sys.exit(main()) |
OLD | NEW |