OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 }, | 8 }, |
9 'target_defaults': { | 9 'target_defaults': { |
10 'sources/': [ | 10 'sources/': [ |
(...skipping 14 matching lines...) Expand all Loading... | |
25 ['include', '/win_[^/]*\\.cc$'], | 25 ['include', '/win_[^/]*\\.cc$'], |
26 ]}], | 26 ]}], |
27 ], | 27 ], |
28 }, | 28 }, |
29 'includes': [ | 29 'includes': [ |
30 'ipc.gypi', | 30 'ipc.gypi', |
31 ], | 31 ], |
32 'targets': [ | 32 'targets': [ |
33 { | 33 { |
34 'target_name': 'ipc_tests', | 34 'target_name': 'ipc_tests', |
35 'type': 'executable', | 35 'type': '<(gtest_target_type)', |
36 'dependencies': [ | 36 'dependencies': [ |
37 'ipc', | 37 'ipc', |
38 '../base/base.gyp:base', | 38 '../base/base.gyp:base', |
39 '../base/base.gyp:base_i18n', | 39 '../base/base.gyp:base_i18n', |
40 '../base/base.gyp:test_support_base', | 40 '../base/base.gyp:test_support_base', |
41 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic _annotations', | 41 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic _annotations', |
42 '../testing/gtest.gyp:gtest', | 42 '../testing/gtest.gyp:gtest', |
43 ], | 43 ], |
44 'include_dirs': [ | 44 'include_dirs': [ |
45 '..' | 45 '..' |
(...skipping 10 matching lines...) Expand all Loading... | |
56 'ipc_tests.cc', | 56 'ipc_tests.cc', |
57 'ipc_tests.h', | 57 'ipc_tests.h', |
58 'sync_socket_unittest.cc', | 58 'sync_socket_unittest.cc', |
59 ], | 59 ], |
60 'conditions': [ | 60 'conditions': [ |
61 ['toolkit_uses_gtk == 1', { | 61 ['toolkit_uses_gtk == 1', { |
62 'dependencies': [ | 62 'dependencies': [ |
63 '../build/linux/system.gyp:gtk', | 63 '../build/linux/system.gyp:gtk', |
64 ], | 64 ], |
65 }], | 65 }], |
66 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { | |
67 'dependencies': [ | |
68 '../testing/android/native_test.gyp:native_test_native_code', | |
69 ], | |
70 }], | |
66 ['os_posix == 1 and OS != "mac" and OS != "android"', { | 71 ['os_posix == 1 and OS != "mac" and OS != "android"', { |
67 'conditions': [ | 72 'conditions': [ |
68 ['linux_use_tcmalloc==1', { | 73 ['linux_use_tcmalloc==1', { |
69 'dependencies': [ | 74 'dependencies': [ |
70 '../base/allocator/allocator.gyp:allocator', | 75 '../base/allocator/allocator.gyp:allocator', |
71 ], | 76 ], |
72 }], | 77 }], |
73 ], | 78 ], |
74 }] | 79 }] |
75 ], | 80 ], |
76 }, | 81 }, |
77 { | 82 { |
78 'target_name': 'test_support_ipc', | 83 'target_name': 'test_support_ipc', |
79 'type': 'static_library', | 84 'type': 'static_library', |
80 'dependencies': [ | 85 'dependencies': [ |
81 'ipc', | 86 'ipc', |
82 '../base/base.gyp:base', | 87 '../base/base.gyp:base', |
83 ], | 88 ], |
84 'sources': [ | 89 'sources': [ |
85 'ipc_test_sink.cc', | 90 'ipc_test_sink.cc', |
86 'ipc_test_sink.h', | 91 'ipc_test_sink.h', |
87 ], | 92 ], |
88 }, | 93 }, |
89 ], | 94 ], |
95 'conditions': [ | |
96 # Special target to wrap a <(gtest_target_type)==shared_library | |
97 # ipc_tests into an android apk for execution. | |
98 # See base.gyp for TODO(jrg)s about this strategy. | |
bulach
2012/04/12 15:51:42
ditto..
| |
99 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { | |
100 'targets': [ | |
101 { | |
102 'target_name': 'ipc_tests_apk', | |
103 'type': 'none', | |
104 'dependencies': [ | |
105 'ipc_tests', | |
106 ], | |
107 'actions': [ | |
108 { | |
109 # Generate apk files (including source and antfile) from | |
110 # a template. | |
111 'action_name': 'generate_ipc_tests_apk', | |
112 'dependencies': [ | |
113 'base', # So that android/java/java.gyp:base_java is built | |
114 'ipc_tests', | |
115 ], | |
116 'inputs': [ | |
117 '../testing/android/generate_native_test.py', | |
118 '<(PRODUCT_DIR)/lib.target/libipc_tests.so', | |
119 '<(PRODUCT_DIR)/chromium_base.jar' | |
120 ], | |
121 'outputs': [ | |
122 '<(PRODUCT_DIR)/ipc_tests_apk/AndroidManifest.xml' | |
123 ], | |
124 'action': [ | |
125 '../testing/android/generate_native_test.py', | |
126 '--native_library', | |
127 '<(PRODUCT_DIR)/lib.target/libipc_tests.so', | |
128 # TODO(jrg): find a better way to specify jar | |
129 # dependencies. Hard coding seems fragile. | |
130 '--jars', | |
131 '<(PRODUCT_DIR)/chromium_base.jar', | |
132 '--output', | |
133 '<(PRODUCT_DIR)/ipc_tests_apk' | |
134 ], | |
135 }, | |
136 { | |
137 # Build the generated template file, wrapping the | |
138 # relevant .so and jar. | |
139 'action_name': 'build_ipc_tests_apk', | |
140 'dependencies': [ | |
141 'generate_ipc_tests_apk', | |
142 ], | |
143 'inputs': [ | |
144 '<(PRODUCT_DIR)/ipc_tests_apk/AndroidManifest.xml' | |
145 ], | |
146 'outputs': [ | |
147 '<(PRODUCT_DIR)/ChromeNativeTests_ipc_tests-debug.apk', | |
148 ], | |
149 'action': [ | |
150 'ant', | |
151 '-DPRODUCT_DIR=<(PRODUCT_DIR)', | |
152 '-buildfile', | |
153 '<(PRODUCT_DIR)/ipc_tests_apk/native_test_apk.xml', | |
154 ] | |
155 }, | |
156 ] | |
157 }], | |
158 }], | |
159 ], | |
90 } | 160 } |
OLD | NEW |