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.
7 cr_cronet.py - cr - like helper tool for cronet developers
16 return os
.system(command
)
19 parser
= argparse
.ArgumentParser()
20 parser
.add_argument('command',
28 options
= parser
.parse_args()
31 gyp_defines
= 'GYP_DEFINES="OS=android enable_websockets=0 '+ \
32 'disable_file_support=1 disable_ftp_support=1 '+ \
33 'use_icu_alternatives_on_android=1" '
35 if (options
.command
=='init'):
36 return run (gyp_defines
+ ' gclient runhooks')
37 if (options
.command
=='sync'):
38 return run ('git pull --rebase && ' + gyp_defines
+ ' gclient sync')
39 if (options
.command
=='build'):
40 return run ('ninja -C out/Debug cronet_sample_test_apk')
41 if (options
.command
=='install'):
42 return run ('build/android/adb_install_apk.py --apk=CronetSample.apk')
43 if (options
.command
=='test'):
44 return run ('build/android/test_runner.py instrumentation '+ \
45 '--test-apk=CronetSampleTest')
51 if __name__
== '__main__':