| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 | 7 |
| 8 declare_args() { | 8 declare_args() { |
| 9 compile_suid_client = is_linux | 9 compile_suid_client = is_linux |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 sources += [ | 110 sources += [ |
| 111 "suid/client/setuid_sandbox_client_unittest.cc", | 111 "suid/client/setuid_sandbox_client_unittest.cc", |
| 112 "suid/client/setuid_sandbox_host_unittest.cc", | 112 "suid/client/setuid_sandbox_host_unittest.cc", |
| 113 ] | 113 ] |
| 114 } | 114 } |
| 115 if (use_seccomp_bpf) { | 115 if (use_seccomp_bpf) { |
| 116 sources += [ | 116 sources += [ |
| 117 "bpf_dsl/bpf_dsl_unittest.cc", | 117 "bpf_dsl/bpf_dsl_unittest.cc", |
| 118 "bpf_dsl/codegen_unittest.cc", | 118 "bpf_dsl/codegen_unittest.cc", |
| 119 "bpf_dsl/cons_unittest.cc", | 119 "bpf_dsl/cons_unittest.cc", |
| 120 "bpf_dsl/errorcode_unittest.cc", |
| 120 "bpf_dsl/syscall_set_unittest.cc", | 121 "bpf_dsl/syscall_set_unittest.cc", |
| 122 "bpf_dsl/test_trap_registry.cc", |
| 123 "bpf_dsl/test_trap_registry.h", |
| 124 "bpf_dsl/test_trap_registry_unittest.cc", |
| 121 "integration_tests/bpf_dsl_seccomp_unittest.cc", | 125 "integration_tests/bpf_dsl_seccomp_unittest.cc", |
| 122 "integration_tests/seccomp_broker_process_unittest.cc", | 126 "integration_tests/seccomp_broker_process_unittest.cc", |
| 123 "seccomp-bpf-helpers/baseline_policy_unittest.cc", | 127 "seccomp-bpf-helpers/baseline_policy_unittest.cc", |
| 124 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc", | 128 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc", |
| 125 "seccomp-bpf/bpf_tests_unittest.cc", | 129 "seccomp-bpf/bpf_tests_unittest.cc", |
| 126 "seccomp-bpf/errorcode_unittest.cc", | |
| 127 "seccomp-bpf/sandbox_bpf_unittest.cc", | 130 "seccomp-bpf/sandbox_bpf_unittest.cc", |
| 128 "seccomp-bpf/syscall_unittest.cc", | 131 "seccomp-bpf/syscall_unittest.cc", |
| 129 "seccomp-bpf/trap_unittest.cc", | 132 "seccomp-bpf/trap_unittest.cc", |
| 130 ] | 133 ] |
| 131 } | 134 } |
| 132 if (compile_credentials) { | 135 if (compile_credentials) { |
| 133 sources += [ | 136 sources += [ |
| 134 "integration_tests/namespace_unix_domain_socket_unittest.cc", | 137 "integration_tests/namespace_unix_domain_socket_unittest.cc", |
| 135 "services/credentials_unittest.cc", | 138 "services/credentials_unittest.cc", |
| 136 "services/namespace_utils_unittest.cc", | 139 "services/namespace_utils_unittest.cc", |
| 137 ] | 140 ] |
| 138 | 141 |
| 139 if (use_base_test_suite) { | 142 if (use_base_test_suite) { |
| 140 # Tests that use advanced features not available in stock GTest. | 143 # Tests that use advanced features not available in stock GTest. |
| 141 sources += [ "services/namespace_sandbox_unittest.cc" ] | 144 sources += [ "services/namespace_sandbox_unittest.cc" ] |
| 142 } | 145 } |
| 143 | 146 |
| 144 # For credentials_unittest.cc | 147 # For credentials_unittest.cc |
| 145 configs += [ "//build/config/linux:libcap" ] | 148 configs += [ "//build/config/linux:libcap" ] |
| 146 } | 149 } |
| 147 } | 150 } |
| 148 | 151 |
| 152 # TODO(GYP): Delete this after we've converted everything to GN. |
| 153 # The _run targets exist only for compatibility w/ GYP. |
| 154 group("sandbox_linux_unittests_run") { |
| 155 testonly = true |
| 156 deps = [ |
| 157 ":sandbox_linux_unittests", |
| 158 ] |
| 159 } |
| 160 |
| 149 # The main sandboxing test target. | 161 # The main sandboxing test target. |
| 150 test("sandbox_linux_unittests") { | 162 test("sandbox_linux_unittests") { |
| 151 deps = [ | 163 deps = [ |
| 152 ":sandbox_linux_unittests_sources", | 164 ":sandbox_linux_unittests_sources", |
| 153 ] | 165 ] |
| 154 } | 166 } |
| 155 | 167 |
| 156 # This target is the shared library used by Android APK (i.e. | 168 # This target is the shared library used by Android APK (i.e. |
| 157 # JNI-friendly) tests. | 169 # JNI-friendly) tests. |
| 158 shared_library("sandbox_linux_jni_unittests") { | 170 shared_library("sandbox_linux_jni_unittests") { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 169 sources = [ | 181 sources = [ |
| 170 "bpf_dsl/bpf_dsl.cc", | 182 "bpf_dsl/bpf_dsl.cc", |
| 171 "bpf_dsl/bpf_dsl.h", | 183 "bpf_dsl/bpf_dsl.h", |
| 172 "bpf_dsl/bpf_dsl_forward.h", | 184 "bpf_dsl/bpf_dsl_forward.h", |
| 173 "bpf_dsl/bpf_dsl_impl.h", | 185 "bpf_dsl/bpf_dsl_impl.h", |
| 174 "bpf_dsl/codegen.cc", | 186 "bpf_dsl/codegen.cc", |
| 175 "bpf_dsl/codegen.h", | 187 "bpf_dsl/codegen.h", |
| 176 "bpf_dsl/cons.h", | 188 "bpf_dsl/cons.h", |
| 177 "bpf_dsl/dump_bpf.cc", | 189 "bpf_dsl/dump_bpf.cc", |
| 178 "bpf_dsl/dump_bpf.h", | 190 "bpf_dsl/dump_bpf.h", |
| 191 "bpf_dsl/errorcode.cc", |
| 192 "bpf_dsl/errorcode.h", |
| 179 "bpf_dsl/linux_syscall_ranges.h", | 193 "bpf_dsl/linux_syscall_ranges.h", |
| 180 "bpf_dsl/policy.cc", | 194 "bpf_dsl/policy.cc", |
| 181 "bpf_dsl/policy.h", | 195 "bpf_dsl/policy.h", |
| 182 "bpf_dsl/policy_compiler.cc", | 196 "bpf_dsl/policy_compiler.cc", |
| 183 "bpf_dsl/policy_compiler.h", | 197 "bpf_dsl/policy_compiler.h", |
| 184 "bpf_dsl/seccomp_macros.h", | 198 "bpf_dsl/seccomp_macros.h", |
| 185 "bpf_dsl/syscall_set.cc", | 199 "bpf_dsl/syscall_set.cc", |
| 186 "bpf_dsl/syscall_set.h", | 200 "bpf_dsl/syscall_set.h", |
| 187 "bpf_dsl/trap_registry.h", | 201 "bpf_dsl/trap_registry.h", |
| 188 "bpf_dsl/verifier.cc", | 202 "bpf_dsl/verifier.cc", |
| 189 "bpf_dsl/verifier.h", | 203 "bpf_dsl/verifier.h", |
| 190 "seccomp-bpf/die.cc", | 204 "seccomp-bpf/die.cc", |
| 191 "seccomp-bpf/die.h", | 205 "seccomp-bpf/die.h", |
| 192 "seccomp-bpf/errorcode.cc", | |
| 193 "seccomp-bpf/errorcode.h", | |
| 194 "seccomp-bpf/sandbox_bpf.cc", | 206 "seccomp-bpf/sandbox_bpf.cc", |
| 195 "seccomp-bpf/sandbox_bpf.h", | 207 "seccomp-bpf/sandbox_bpf.h", |
| 196 "seccomp-bpf/syscall.cc", | 208 "seccomp-bpf/syscall.cc", |
| 197 "seccomp-bpf/syscall.h", | 209 "seccomp-bpf/syscall.h", |
| 198 "seccomp-bpf/trap.cc", | 210 "seccomp-bpf/trap.cc", |
| 199 "seccomp-bpf/trap.h", | 211 "seccomp-bpf/trap.h", |
| 200 ] | 212 ] |
| 201 defines = [ "SANDBOX_IMPLEMENTATION" ] | 213 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 202 | 214 |
| 203 deps = [ | 215 deps = [ |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 # 'type': 'none', | 385 # 'type': 'none', |
| 374 # 'variables': { | 386 # 'variables': { |
| 375 # 'test_suite_name': 'sandbox_linux_jni_unittests', | 387 # 'test_suite_name': 'sandbox_linux_jni_unittests', |
| 376 # }, | 388 # }, |
| 377 # 'dependencies': [ | 389 # 'dependencies': [ |
| 378 # 'sandbox_linux_jni_unittests', | 390 # 'sandbox_linux_jni_unittests', |
| 379 # ], | 391 # ], |
| 380 # 'includes': [ '../../build/apk_test.gypi' ], | 392 # 'includes': [ '../../build/apk_test.gypi' ], |
| 381 # } | 393 # } |
| 382 } | 394 } |
| OLD | NEW |