| 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("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
| 7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
| 8 | 8 |
| 9 # |is_nacl_nonsfi| is not used in Mojo builds. | 9 # |is_nacl_nonsfi| is not used in Mojo builds. |
| 10 assert(!defined(is_nacl_nonsfi)) | 10 assert(!defined(is_nacl_nonsfi)) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 "tests/sandbox_test_runner.h", | 59 "tests/sandbox_test_runner.h", |
| 60 "tests/sandbox_test_runner_function_pointer.cc", | 60 "tests/sandbox_test_runner_function_pointer.cc", |
| 61 "tests/sandbox_test_runner_function_pointer.h", | 61 "tests/sandbox_test_runner_function_pointer.h", |
| 62 "tests/test_utils.cc", | 62 "tests/test_utils.cc", |
| 63 "tests/test_utils.h", | 63 "tests/test_utils.h", |
| 64 "tests/unit_tests.cc", | 64 "tests/unit_tests.cc", |
| 65 "tests/unit_tests.h", | 65 "tests/unit_tests.h", |
| 66 ] | 66 ] |
| 67 | 67 |
| 68 deps = [ | 68 deps = [ |
| 69 "//base/third_party/dynamic_annotations", |
| 69 "//testing/gtest", | 70 "//testing/gtest", |
| 70 ] | 71 ] |
| 71 | 72 |
| 72 if (use_seccomp_bpf) { | 73 if (use_seccomp_bpf) { |
| 73 sources += [ | 74 sources += [ |
| 74 "seccomp-bpf/bpf_tester_compatibility_delegate.h", | 75 "seccomp-bpf/bpf_tester_compatibility_delegate.h", |
| 75 "seccomp-bpf/bpf_tests.h", | 76 "seccomp-bpf/bpf_tests.h", |
| 76 "seccomp-bpf/sandbox_bpf_test_runner.cc", | 77 "seccomp-bpf/sandbox_bpf_test_runner.cc", |
| 77 "seccomp-bpf/sandbox_bpf_test_runner.h", | 78 "seccomp-bpf/sandbox_bpf_test_runner.h", |
| 78 ] | 79 ] |
| (...skipping 24 matching lines...) Expand all Loading... |
| 103 "tests/scoped_temporary_file.h", | 104 "tests/scoped_temporary_file.h", |
| 104 "tests/scoped_temporary_file_unittest.cc", | 105 "tests/scoped_temporary_file_unittest.cc", |
| 105 "tests/test_utils_unittest.cc", | 106 "tests/test_utils_unittest.cc", |
| 106 "tests/unit_tests_unittest.cc", | 107 "tests/unit_tests_unittest.cc", |
| 107 ] | 108 ] |
| 108 | 109 |
| 109 deps = [ | 110 deps = [ |
| 110 ":sandbox", | 111 ":sandbox", |
| 111 ":sandbox_linux_test_utils", | 112 ":sandbox_linux_test_utils", |
| 112 "//base", | 113 "//base", |
| 114 "//base/third_party/dynamic_annotations", |
| 113 "//testing/gtest", | 115 "//testing/gtest", |
| 114 ] | 116 ] |
| 115 | 117 |
| 116 if (use_base_test_suite) { | 118 if (use_base_test_suite) { |
| 117 deps += [ "//base/test:test_support" ] | 119 deps += [ "//base/test:test_support" ] |
| 118 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ] | 120 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ] |
| 119 } | 121 } |
| 120 | 122 |
| 121 if (is_linux) { | 123 if (is_linux) { |
| 122 # Don't use this on Android. | 124 # Don't use this on Android. |
| 123 libs = [ "rt" ] | 125 libs = [ "rt" ] |
| 124 } | 126 } |
| 125 | 127 |
| 126 if (compile_suid_client) { | 128 if (compile_suid_client) { |
| 127 sources += [ | 129 sources += [ |
| 128 "suid/client/setuid_sandbox_client_unittest.cc", | 130 "suid/client/setuid_sandbox_client_unittest.cc", |
| 129 "suid/client/setuid_sandbox_host_unittest.cc", | 131 "suid/client/setuid_sandbox_host_unittest.cc", |
| 130 ] | 132 ] |
| 133 deps += [ ":suid_sandbox_client" ] |
| 131 } | 134 } |
| 132 if (use_seccomp_bpf) { | 135 if (use_seccomp_bpf) { |
| 133 sources += [ | 136 sources += [ |
| 134 "bpf_dsl/bpf_dsl_unittest.cc", | 137 "bpf_dsl/bpf_dsl_unittest.cc", |
| 135 "bpf_dsl/codegen_unittest.cc", | 138 "bpf_dsl/codegen_unittest.cc", |
| 136 "bpf_dsl/cons_unittest.cc", | 139 "bpf_dsl/cons_unittest.cc", |
| 137 "bpf_dsl/dump_bpf.cc", | 140 "bpf_dsl/dump_bpf.cc", |
| 138 "bpf_dsl/dump_bpf.h", | 141 "bpf_dsl/dump_bpf.h", |
| 139 "bpf_dsl/syscall_set_unittest.cc", | 142 "bpf_dsl/syscall_set_unittest.cc", |
| 140 "bpf_dsl/test_trap_registry.cc", | 143 "bpf_dsl/test_trap_registry.cc", |
| 141 "bpf_dsl/test_trap_registry.h", | 144 "bpf_dsl/test_trap_registry.h", |
| 142 "bpf_dsl/test_trap_registry_unittest.cc", | 145 "bpf_dsl/test_trap_registry_unittest.cc", |
| 143 "bpf_dsl/verifier.cc", | 146 "bpf_dsl/verifier.cc", |
| 144 "bpf_dsl/verifier.h", | 147 "bpf_dsl/verifier.h", |
| 145 "integration_tests/bpf_dsl_seccomp_unittest.cc", | 148 "integration_tests/bpf_dsl_seccomp_unittest.cc", |
| 146 "integration_tests/seccomp_broker_process_unittest.cc", | 149 "integration_tests/seccomp_broker_process_unittest.cc", |
| 147 "seccomp-bpf-helpers/baseline_policy_unittest.cc", | 150 "seccomp-bpf-helpers/baseline_policy_unittest.cc", |
| 148 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc", | 151 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc", |
| 149 "seccomp-bpf/bpf_tests_unittest.cc", | 152 "seccomp-bpf/bpf_tests_unittest.cc", |
| 150 "seccomp-bpf/sandbox_bpf_unittest.cc", | 153 "seccomp-bpf/sandbox_bpf_unittest.cc", |
| 151 "seccomp-bpf/syscall_unittest.cc", | 154 "seccomp-bpf/syscall_unittest.cc", |
| 152 "seccomp-bpf/trap_unittest.cc", | 155 "seccomp-bpf/trap_unittest.cc", |
| 153 ] | 156 ] |
| 154 deps += [ ":bpf_dsl_golden" ] | 157 deps += [ |
| 158 ":bpf_dsl_golden", |
| 159 ":sandbox_services_headers", |
| 160 ":seccomp_bpf", |
| 161 ":seccomp_bpf_helpers", |
| 162 ] |
| 155 } | 163 } |
| 156 if (compile_credentials) { | 164 if (compile_credentials) { |
| 157 sources += [ | 165 sources += [ |
| 158 "integration_tests/namespace_unix_domain_socket_unittest.cc", | 166 "integration_tests/namespace_unix_domain_socket_unittest.cc", |
| 159 "services/credentials_unittest.cc", | 167 "services/credentials_unittest.cc", |
| 160 "services/namespace_utils_unittest.cc", | 168 "services/namespace_utils_unittest.cc", |
| 161 ] | 169 ] |
| 170 deps += [ ":sandbox_services" ] |
| 162 | 171 |
| 163 if (use_base_test_suite) { | 172 if (use_base_test_suite) { |
| 164 # Tests that use advanced features not available in stock GTest. | 173 # Tests that use advanced features not available in stock GTest. |
| 165 sources += [ "services/namespace_sandbox_unittest.cc" ] | 174 sources += [ "services/namespace_sandbox_unittest.cc" ] |
| 166 } | 175 } |
| 167 | 176 |
| 168 # For credentials_unittest.cc | 177 # For credentials_unittest.cc |
| 169 configs += [ "//build/config/linux:libcap" ] | 178 configs += [ "//build/config/linux:libcap" ] |
| 170 } | 179 } |
| 171 } | 180 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 "seccomp-bpf/syscall.h", | 252 "seccomp-bpf/syscall.h", |
| 244 "seccomp-bpf/trap.cc", | 253 "seccomp-bpf/trap.cc", |
| 245 "seccomp-bpf/trap.h", | 254 "seccomp-bpf/trap.h", |
| 246 ] | 255 ] |
| 247 defines = [ "SANDBOX_IMPLEMENTATION" ] | 256 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 248 | 257 |
| 249 deps = [ | 258 deps = [ |
| 250 ":sandbox_services", | 259 ":sandbox_services", |
| 251 ":sandbox_services_headers", | 260 ":sandbox_services_headers", |
| 252 "//base", | 261 "//base", |
| 262 "//base/third_party/dynamic_annotations", |
| 253 ] | 263 ] |
| 254 | 264 |
| 255 if (is_nacl_nonsfi) { | 265 if (is_nacl_nonsfi) { |
| 256 cflags = [ "-fgnu-inline-asm" ] | 266 cflags = [ "-fgnu-inline-asm" ] |
| 257 sources -= [ | 267 sources -= [ |
| 258 "bpf_dsl/bpf_dsl_forward.h", | 268 "bpf_dsl/bpf_dsl_forward.h", |
| 259 "bpf_dsl/bpf_dsl_impl.h", | 269 "bpf_dsl/bpf_dsl_impl.h", |
| 260 "bpf_dsl/cons.h", | 270 "bpf_dsl/cons.h", |
| 261 "bpf_dsl/errorcode.h", | 271 "bpf_dsl/errorcode.h", |
| 262 "bpf_dsl/linux_syscall_ranges.h", | 272 "bpf_dsl/linux_syscall_ranges.h", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 274 "seccomp-bpf-helpers/sigsys_handlers.h", | 284 "seccomp-bpf-helpers/sigsys_handlers.h", |
| 275 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", | 285 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", |
| 276 "seccomp-bpf-helpers/syscall_parameters_restrictions.h", | 286 "seccomp-bpf-helpers/syscall_parameters_restrictions.h", |
| 277 "seccomp-bpf-helpers/syscall_sets.cc", | 287 "seccomp-bpf-helpers/syscall_sets.cc", |
| 278 "seccomp-bpf-helpers/syscall_sets.h", | 288 "seccomp-bpf-helpers/syscall_sets.h", |
| 279 ] | 289 ] |
| 280 defines = [ "SANDBOX_IMPLEMENTATION" ] | 290 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 281 | 291 |
| 282 deps = [ | 292 deps = [ |
| 283 ":sandbox_services", | 293 ":sandbox_services", |
| 294 ":sandbox_services_headers", |
| 284 ":seccomp_bpf", | 295 ":seccomp_bpf", |
| 285 "//base", | 296 "//base", |
| 286 ] | 297 ] |
| 287 | 298 |
| 288 if (is_nacl_nonsfi) { | 299 if (is_nacl_nonsfi) { |
| 289 sources -= [ | 300 sources -= [ |
| 290 "seccomp-bpf-helpers/baseline_policy.cc", | 301 "seccomp-bpf-helpers/baseline_policy.cc", |
| 291 "seccomp-bpf-helpers/baseline_policy.h", | 302 "seccomp-bpf-helpers/baseline_policy.h", |
| 292 "seccomp-bpf-helpers/syscall_sets.cc", | 303 "seccomp-bpf-helpers/syscall_sets.cc", |
| 293 "seccomp-bpf-helpers/syscall_sets.h", | 304 "seccomp-bpf-helpers/syscall_sets.h", |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 "syscall_broker/broker_policy.cc", | 361 "syscall_broker/broker_policy.cc", |
| 351 "syscall_broker/broker_policy.h", | 362 "syscall_broker/broker_policy.h", |
| 352 "syscall_broker/broker_process.cc", | 363 "syscall_broker/broker_process.cc", |
| 353 "syscall_broker/broker_process.h", | 364 "syscall_broker/broker_process.h", |
| 354 ] | 365 ] |
| 355 | 366 |
| 356 defines = [ "SANDBOX_IMPLEMENTATION" ] | 367 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 357 | 368 |
| 358 deps = [ | 369 deps = [ |
| 359 "//base", | 370 "//base", |
| 371 "//base/third_party/dynamic_annotations", |
| 360 ] | 372 ] |
| 361 | 373 |
| 362 if (compile_credentials || is_nacl_nonsfi) { | 374 if (compile_credentials || is_nacl_nonsfi) { |
| 363 sources += [ | 375 sources += [ |
| 364 "services/credentials.cc", | 376 "services/credentials.cc", |
| 365 "services/credentials.h", | 377 "services/credentials.h", |
| 366 "services/namespace_sandbox.cc", | 378 "services/namespace_sandbox.cc", |
| 367 "services/namespace_sandbox.h", | 379 "services/namespace_sandbox.h", |
| 368 "services/namespace_utils.cc", | 380 "services/namespace_utils.cc", |
| 369 "services/namespace_utils.h", | 381 "services/namespace_utils.h", |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 } | 471 } |
| 460 } | 472 } |
| 461 | 473 |
| 462 test_runner_script("sandbox_linux_unittests__test_runner_script") { | 474 test_runner_script("sandbox_linux_unittests__test_runner_script") { |
| 463 test_name = "sandbox_linux_unittests" | 475 test_name = "sandbox_linux_unittests" |
| 464 test_type = "gtest" | 476 test_type = "gtest" |
| 465 test_suite = "sandbox_linux_unittests" | 477 test_suite = "sandbox_linux_unittests" |
| 466 isolate_file = "//sandbox/sandbox_linux_unittests_android.isolate" | 478 isolate_file = "//sandbox/sandbox_linux_unittests_android.isolate" |
| 467 } | 479 } |
| 468 } | 480 } |
| OLD | NEW |