Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """ | |
| 7 cr_cronet.py - cr - like helper tool for cronet developers | |
| 8 """ | |
| 9 | |
| 10 import argparse | |
| 11 import os | |
| 12 import sys | |
| 13 | |
| 14 def run(command): | |
| 15 print command | |
| 16 return os.system(command) | |
| 17 | |
| 18 def main(): | |
| 19 parser = argparse.ArgumentParser() | |
| 20 parser.add_argument('command', choices=['init', 'sync', 'build', 'install', 't est', 'debug']) | |
| 21 options = parser.parse_args() | |
| 22 print options | |
| 23 print options.command | |
| 24 | |
| 25 if (options.command=='init'): | |
| 26 return run ('GYP_DEFINES="OS=android enable_websockets=0 disable_file_suppor t=1 disable_ftp_support=1 use_icu_alternatives_on_android=1" gclient runhooks') | |
|
mmenke
2014/07/07 17:05:20
Should the first part of this also be run before s
mef
2014/07/09 13:43:53
Done.
| |
| 27 if (options.command=='sync'): | |
| 28 return run ('git pull --rebase && gclient sync') | |
| 29 if (options.command=='build'): | |
| 30 return run ('ninja -C out/Debug cronet_sample_test_apk') | |
| 31 if (options.command=='install'): | |
| 32 return run ('build/android/adb_install_apk.py --apk=CronetSample.apk') | |
| 33 if (options.command=='test'): | |
| 34 return run ('build/android/test_runner.py instrumentation --test-apk=CronetS ampleTest') | |
| 35 | |
| 36 #parser.print_help() | |
|
mmenke
2014/07/07 17:05:20
This should be fixed (Get rid of it, make it work
mef
2014/07/09 13:43:53
Done.
| |
| 37 return 1 | |
| 38 | |
| 39 | |
| 40 if __name__ == '__main__': | |
| 41 sys.exit(main()) | |
| OLD | NEW |