blob: ae971442e0fddad414b2525e024eba1a6fa0ade8 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" - cr - like helper tool for cronet developers
import argparse
import os
import sys
def run(command):
print command
return os.system(command)
def main():
parser = argparse.ArgumentParser()
options = parser.parse_args()
print options
print options.command
gyp_defines = 'GYP_DEFINES="OS=android enable_websockets=0 '+ \
'disable_file_support=1 disable_ftp_support=1 '+ \
'use_icu_alternatives_on_android=1" '
if (options.command=='init'):
return run (gyp_defines + ' gclient runhooks')
if (options.command=='sync'):
return run ('git pull --rebase && ' + gyp_defines + ' gclient sync')
if (options.command=='build'):
return run ('ninja -C out/Debug cronet_sample_test_apk')
if (options.command=='install'):
return run ('build/android/ --apk=CronetSample.apk')
if (options.command=='test'):
return run ('build/android/ instrumentation '+ \
return 1
if __name__ == '__main__':