1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/build/apk_test.gypi Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,75 @@ 1.4 +# Copyright (c) 2012 The Chromium Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +# This file is meant to be included into a target to provide a rule 1.9 +# to build APK based test suites. 1.10 +# 1.11 +# To use this, create a gyp target with the following form: 1.12 +# { 1.13 +# 'target_name': 'test_suite_name_apk', 1.14 +# 'type': 'none', 1.15 +# 'variables': { 1.16 +# 'test_suite_name': 'test_suite_name', # string 1.17 +# 'input_shlib_path' : '/path/to/test_suite.so', # string 1.18 +# 'input_jars_paths': ['/path/to/test_suite.jar', ... ], # list 1.19 +# }, 1.20 +# 'includes': ['path/to/this/gypi/file'], 1.21 +# } 1.22 +# 1.23 + 1.24 +{ 1.25 + 'variables': { 1.26 + 'input_jars_paths': [ 1.27 + # Needed by ChromeNativeTestActivity.java. 1.28 + '<(PRODUCT_DIR)/lib.java/chromium_base.jar', 1.29 + ], 1.30 + }, 1.31 + 'target_conditions': [ 1.32 + ['_toolset == "target"', { 1.33 + 'conditions': [ 1.34 + ['OS == "android" and gtest_target_type == "shared_library"', { 1.35 + 'actions': [{ 1.36 + 'action_name': 'apk_<(test_suite_name)', 1.37 + 'message': 'Building <(test_suite_name) test apk.', 1.38 + 'inputs': [ 1.39 + '<(DEPTH)/testing/android/AndroidManifest.xml', 1.40 + '<(DEPTH)/testing/android/generate_native_test.py', 1.41 + '<(input_shlib_path)', 1.42 + '>@(input_jars_paths)', 1.43 + ], 1.44 + 'outputs': [ 1.45 + '<(PRODUCT_DIR)/<(test_suite_name)_apk/<(test_suite_name)-debug.apk', 1.46 + ], 1.47 + 'action': [ 1.48 + '<(DEPTH)/testing/android/generate_native_test.py', 1.49 + '--native_library', 1.50 + '<(input_shlib_path)', 1.51 + '--jars', 1.52 + '">@(input_jars_paths)"', 1.53 + '--output', 1.54 + '<(PRODUCT_DIR)/<(test_suite_name)_apk', 1.55 + '--strip-binary=<(android_strip)', 1.56 + '--app_abi', 1.57 + '<(android_app_abi)', 1.58 + '--ant-args', 1.59 + '-DPRODUCT_DIR=<(ant_build_out)', 1.60 + '--ant-args', 1.61 + '-DANDROID_SDK=<(android_sdk)', 1.62 + '--ant-args', 1.63 + '-DANDROID_SDK_ROOT=<(android_sdk_root)', 1.64 + '--ant-args', 1.65 + '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', 1.66 + '--ant-args', 1.67 + '-DANDROID_SDK_VERSION=<(android_sdk_version)', 1.68 + '--ant-args', 1.69 + '-DANDROID_GDBSERVER=<(android_gdbserver)', 1.70 + '--ant-args', 1.71 + '-DCHROMIUM_SRC=<(ant_build_out)/../..', 1.72 + ], 1.73 + }], 1.74 + }], # 'OS == "android" and gtest_target_type == "shared_library" 1.75 + ], # conditions 1.76 + }], 1.77 + ], # target_conditions 1.78 +}