OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build APK based test suites. | 6 # to build APK based test suites. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # { | 9 # { |
10 # 'target_name': 'test_suite_name_apk', | 10 # 'target_name': 'test_suite_name_apk', |
(...skipping 15 matching lines...) Expand all Loading... |
26 '<(DEPTH)/testing/android/on_device_instrumentation.gyp:reporter_java', | 26 '<(DEPTH)/testing/android/on_device_instrumentation.gyp:reporter_java', |
27 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', | 27 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', |
28 ], | 28 ], |
29 'conditions': [ | 29 'conditions': [ |
30 ['OS == "android"', { | 30 ['OS == "android"', { |
31 'variables': { | 31 'variables': { |
32 # These are used to configure java_apk.gypi included below. | 32 # These are used to configure java_apk.gypi included below. |
33 'test_type': 'gtest', | 33 'test_type': 'gtest', |
34 'apk_name': '<(test_suite_name)', | 34 'apk_name': '<(test_suite_name)', |
35 'intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk', | 35 'intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk', |
| 36 'generated_src_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/<(test_suite_name)_
jinja', ], |
36 'final_apk_path': '<(intermediate_dir)/<(test_suite_name)-debug.apk', | 37 'final_apk_path': '<(intermediate_dir)/<(test_suite_name)-debug.apk', |
37 'java_in_dir': '<(DEPTH)/testing/android/native_test/java', | 38 'java_in_dir': '<(DEPTH)/testing/android/native_test/java', |
38 'native_lib_target': 'lib<(test_suite_name)', | 39 'native_lib_target': 'lib<(test_suite_name)', |
39 # TODO(yfriedman, cjhopman): Support managed installs for gtests. | 40 # TODO(yfriedman, cjhopman): Support managed installs for gtests. |
40 'gyp_managed_install': 0, | 41 'gyp_managed_install': 0, |
| 42 'variables': { |
| 43 'use_native_activity%': "false", |
| 44 'android_manifest_path%': '', |
| 45 }, |
| 46 'use_native_activity%': '<(use_native_activity)', |
| 47 'jinja_variables': [ |
| 48 'native_library_name=<(test_suite_name)', |
| 49 'use_native_activity=<(use_native_activity)', |
| 50 ], |
| 51 'conditions': [ |
| 52 ['component == "shared_library"', { |
| 53 'jinja_variables': [ |
| 54 'is_component_build=true', |
| 55 ], |
| 56 }, { |
| 57 'jinja_variables': [ |
| 58 'is_component_build=false', |
| 59 ], |
| 60 }], |
| 61 ['android_manifest_path == ""', { |
| 62 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/<(test_suite_n
ame)_jinja/AndroidManifest.xml', |
| 63 'manifest_template': '<(DEPTH)/testing/android/native_test/java', |
| 64 }, { |
| 65 'android_manifest_path%': '<(android_manifest_path)', |
| 66 'manifest_template': '', |
| 67 }], |
| 68 ], |
41 }, | 69 }, |
| 70 'conditions': [ |
| 71 ['manifest_template != ""', { |
| 72 'variables': { |
| 73 'jinja_inputs': '<(manifest_template)/AndroidManifest.xml.jinja2', |
| 74 'jinja_output': '<(android_manifest_path)', |
| 75 }, |
| 76 'includes': ['android/jinja_template.gypi'], |
| 77 }], |
| 78 ], |
42 'includes': [ 'java_apk.gypi', 'android/test_runner.gypi' ], | 79 'includes': [ 'java_apk.gypi', 'android/test_runner.gypi' ], |
43 }], # 'OS == "android" | 80 }], # 'OS == "android" |
44 ], # conditions | 81 ], # conditions |
45 } | 82 } |
OLD | NEW |