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 release_arg = '' | 37 release_arg = '' |
38 if options.release: | 38 if options.release: |
39 out_dir = 'out/Release' | 39 out_dir = 'out/Release' |
40 release_arg = ' --release' | 40 release_arg = ' --release' |
41 | 41 |
42 if (options.command=='gyp'): | 42 if (options.command=='gyp'): |
43 return run (gyp_defines + ' gclient runhooks') | 43 return run (gyp_defines + ' gclient runhooks') |
44 if (options.command=='sync'): | 44 if (options.command=='sync'): |
45 return run ('git pull --rebase && ' + gyp_defines + ' gclient sync') | 45 return run ('git pull --rebase && ' + gyp_defines + ' gclient sync') |
46 if (options.command=='build'): | 46 if (options.command=='build'): |
47 return run ('ninja -C ' + out_dir + ' cronet_sample_test_apk') | 47 return run ('ninja -C ' + out_dir + ' cronet_test_instrumentation_apk') |
48 if (options.command=='install'): | 48 if (options.command=='install'): |
49 return run ('build/android/adb_install_apk.py ' + release_arg + \ | 49 return run ('build/android/adb_install_apk.py ' + release_arg + \ |
50 ' --apk=CronetSample.apk') | 50 ' --apk=CronetTest.apk') |
51 if (options.command=='proguard'): | 51 if (options.command=='proguard'): |
52 return run ('ninja -C out/Release cronet_sample_proguard_apk') | 52 return run ('ninja -C ' + out_dir + ' cronet_sample_proguard_apk') |
53 if (options.command=='test'): | 53 if (options.command=='test'): |
54 return run ('build/android/test_runner.py instrumentation '+ \ | 54 return run ('build/android/test_runner.py instrumentation '+ \ |
55 release_arg + ' --test-apk=CronetSampleTest') | 55 release_arg + ' --test-apk=CronetTestInstrumentation') |
56 | 56 |
57 parser.print_help() | 57 parser.print_help() |
58 return 1 | 58 return 1 |
59 | 59 |
60 | 60 |
61 if __name__ == '__main__': | 61 if __name__ == '__main__': |
62 sys.exit(main()) | 62 sys.exit(main()) |
OLD | NEW |