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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'sandbox_linux_unittests_apk_target': 0, | |
8 # Whether to build the android test as an APK or an ELF executable. | |
9 'build_android_jni_test': 1, | |
jln (very slow on Chromium)
2013/01/30 00:04:25
This is a poor solution to keep both APK and non A
Agrawal
2013/01/30 01:43:08
I am not sure why you are doing this. If you want
jln (very slow on Chromium)
2013/01/30 01:56:29
There must be something I don't know. Are you sayi
Agrawal
2013/01/30 02:17:05
IIRC, you can modify GYP_DEFINES in your environme
jln (very slow on Chromium)
2013/01/30 02:27:51
I tried that (without an external gypi file though
| |
7 'conditions': [ | 10 'conditions': [ |
8 ['OS=="linux"', { | 11 ['OS=="linux"', { |
9 'compile_suid_client': 1, | 12 'compile_suid_client': 1, |
10 }, { | 13 }, { |
11 'compile_suid_client': 0, | 14 'compile_suid_client': 0, |
12 }], | 15 }], |
13 ['((OS=="linux" or OS=="android") and ' | 16 ['((OS=="linux" or OS=="android") and ' |
14 '(target_arch=="ia32" or target_arch=="x64" or ' | 17 '(target_arch=="ia32" or target_arch=="x64" or ' |
15 'target_arch=="arm"))', { | 18 'target_arch=="arm"))', { |
16 'compile_seccomp_bpf': 1, | 19 'compile_seccomp_bpf': 1, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 [ 'compile_seccomp_bpf==1', { | 62 [ 'compile_seccomp_bpf==1', { |
60 'type': 'static_library', | 63 'type': 'static_library', |
61 'dependencies': [ | 64 'dependencies': [ |
62 'seccomp_bpf', | 65 'seccomp_bpf', |
63 ], | 66 ], |
64 }], | 67 }], |
65 ], | 68 ], |
66 }, | 69 }, |
67 { | 70 { |
68 'target_name': 'sandbox_linux_unittests', | 71 'target_name': 'sandbox_linux_unittests', |
69 'type': '<(gtest_target_type)', | |
70 'dependencies': [ | 72 'dependencies': [ |
71 'sandbox', | 73 'sandbox', |
72 '../testing/gtest.gyp:gtest', | 74 '../testing/gtest.gyp:gtest', |
73 ], | 75 ], |
74 'sources': [ | 76 'sources': [ |
75 'tests/main.cc', | 77 'tests/main.cc', |
76 'tests/unit_tests.cc', | 78 'tests/unit_tests.cc', |
77 'tests/unit_tests.h', | 79 'tests/unit_tests.h', |
78 'services/broker_process_unittest.cc', | 80 'services/broker_process_unittest.cc', |
79 ], | 81 ], |
80 'include_dirs': [ | 82 'include_dirs': [ |
81 '../..', | 83 '../..', |
82 ], | 84 ], |
83 'conditions': [ | 85 'conditions': [ |
86 [ 'build_android_jni_test==1', { | |
87 'type': '<(gtest_target_type)', | |
88 }, { | |
89 'type': 'executable', | |
90 }], | |
84 [ 'compile_suid_client==1', { | 91 [ 'compile_suid_client==1', { |
85 'sources': [ | 92 'sources': [ |
86 'suid/client/setuid_sandbox_client_unittest.cc', | 93 'suid/client/setuid_sandbox_client_unittest.cc', |
87 ], | 94 ], |
88 }], | 95 }], |
89 [ 'compile_seccomp_bpf==1', { | 96 [ 'compile_seccomp_bpf==1', { |
90 'sources': [ | 97 'sources': [ |
91 'seccomp-bpf/bpf_tests.h', | 98 'seccomp-bpf/bpf_tests.h', |
92 'seccomp-bpf/codegen_unittest.cc', | 99 'seccomp-bpf/codegen_unittest.cc', |
93 'seccomp-bpf/errorcode_unittest.cc', | 100 'seccomp-bpf/errorcode_unittest.cc', |
94 'seccomp-bpf/sandbox_bpf_unittest.cc', | 101 'seccomp-bpf/sandbox_bpf_unittest.cc', |
95 'seccomp-bpf/syscall_iterator_unittest.cc', | 102 'seccomp-bpf/syscall_iterator_unittest.cc', |
96 'seccomp-bpf/syscall_unittest.cc', | 103 'seccomp-bpf/syscall_unittest.cc', |
97 ], | 104 ], |
98 }], | 105 }], |
99 ['OS == "android" and gtest_target_type == "shared_library"', { | 106 [ 'OS == "android" and gtest_target_type == "shared_library"', { |
100 'dependencies': [ | 107 'dependencies': [ |
101 '../testing/android/native_test.gyp:native_test_native_code', | 108 '../testing/android/native_test.gyp:native_test_native_code', |
102 ] | 109 ], |
103 }], | 110 }], |
104 ], | 111 ], |
105 }, | 112 }, |
106 { | 113 { |
107 'target_name': 'seccomp_bpf', | 114 'target_name': 'seccomp_bpf', |
108 'type': 'static_library', | 115 'type': 'static_library', |
109 'sources': [ | 116 'sources': [ |
110 'seccomp-bpf/basicblock.cc', | 117 'seccomp-bpf/basicblock.cc', |
111 'seccomp-bpf/basicblock.h', | 118 'seccomp-bpf/basicblock.h', |
112 'seccomp-bpf/codegen.cc', | 119 'seccomp-bpf/codegen.cc', |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 'suid/client/setuid_sandbox_client.cc', | 214 'suid/client/setuid_sandbox_client.cc', |
208 'suid/client/setuid_sandbox_client.h', | 215 'suid/client/setuid_sandbox_client.h', |
209 ], | 216 ], |
210 'dependencies': [ | 217 'dependencies': [ |
211 '../base/base.gyp:base', | 218 '../base/base.gyp:base', |
212 ], | 219 ], |
213 'include_dirs': [ | 220 'include_dirs': [ |
214 '..', | 221 '..', |
215 ], | 222 ], |
216 }, | 223 }, |
217 | |
218 ], | 224 ], |
219 'conditions': [ | 225 'conditions': [ |
220 # Strategy copied from base_unittests_apk in base/base.gyp. | 226 # Strategy copied from base_unittests_apk in base/base.gyp. |
221 [ 'OS=="android" and gtest_target_type == "shared_library"', { | 227 [ 'OS=="android" and gtest_target_type == "shared_library"', { |
222 'targets': [ | 228 'targets': [ |
223 { | 229 { |
224 'target_name': 'sandbox_linux_unittests_apk', | 230 'target_name': 'sandbox_linux_unittests_apk', |
225 'type': 'none', | 231 'type': 'none', |
226 'dependencies': [ | |
227 'sandbox_linux_unittests', | |
228 ], | |
229 'variables': { | 232 'variables': { |
233 'sandbox_linux_unittests_apk_target': 1, | |
Agrawal
2013/01/30 01:43:08
What does this accomplish?
jln (very slow on Chromium)
2013/01/30 01:56:29
It's not used at the moment. I was fiddling with i
Agrawal
2013/01/30 02:17:05
I still do not understand this. these variables ar
| |
230 'test_suite_name': 'sandbox_linux_unittests', | 234 'test_suite_name': 'sandbox_linux_unittests', |
231 'input_shlib_path': | 235 'input_shlib_path': |
232 '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sandbox_linux_unittests' | 236 '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sandbox_linux_unittests' |
233 '<(SHARED_LIB_SUFFIX)', | 237 '<(SHARED_LIB_SUFFIX)', |
234 }, | 238 }, |
239 'dependencies': [ | |
240 'sandbox_linux_unittests', | |
241 ], | |
235 'includes': [ '../../build/apk_test.gypi' ], | 242 'includes': [ '../../build/apk_test.gypi' ], |
236 } | 243 } |
237 ], | 244 ], |
238 }], | 245 }], |
239 ], | 246 ], |
240 } | 247 } |
OLD | NEW |