| 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 if (is_android) { | 9 if (is_android) { |
| 10 import("//build/config/android/rules.gni") | 10 import("//build/config/android/rules.gni") |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 # TODO(GYP): Delete these after we've converted everything to GN. | 195 # TODO(GYP): Delete these after we've converted everything to GN. |
| 196 # The _run targets exist only for compatibility w/ GYP. | 196 # The _run targets exist only for compatibility w/ GYP. |
| 197 group("sandbox_linux_unittests_run") { | 197 group("sandbox_linux_unittests_run") { |
| 198 testonly = true | 198 testonly = true |
| 199 deps = [ | 199 deps = [ |
| 200 ":sandbox_linux_unittests", | 200 ":sandbox_linux_unittests", |
| 201 ] | 201 ] |
| 202 } | 202 } |
| 203 | 203 |
| 204 if (is_android) { | 204 test("sandbox_linux_unittests") { |
| 205 group("sandbox_linux_unittests_apk_run") { | |
| 206 testonly = true | |
| 207 deps = [ | |
| 208 ":sandbox_linux_unittests", | |
| 209 ] | |
| 210 } | |
| 211 } | |
| 212 | |
| 213 # The main sandboxing test target. "sandbox_linux_unittests" cannot use the | |
| 214 # test() template because the test is run as an executable not as an APK on | |
| 215 # Android. | |
| 216 executable("sandbox_linux_unittests") { | |
| 217 testonly = true | |
| 218 deps = [ | 205 deps = [ |
| 219 ":sandbox_linux_unittests_sources", | 206 ":sandbox_linux_unittests_sources", |
| 220 "//build/config/sanitizers:deps", | 207 "//build/config/sanitizers:deps", |
| 221 ] | 208 ] |
| 209 if (is_android) { |
| 210 use_raw_android_executable = true |
| 211 } |
| 222 } | 212 } |
| 223 | 213 |
| 224 component("seccomp_bpf") { | 214 component("seccomp_bpf") { |
| 225 sources = [ | 215 sources = [ |
| 226 "bpf_dsl/bpf_dsl.cc", | 216 "bpf_dsl/bpf_dsl.cc", |
| 227 "bpf_dsl/bpf_dsl.h", | 217 "bpf_dsl/bpf_dsl.h", |
| 228 "bpf_dsl/bpf_dsl_forward.h", | 218 "bpf_dsl/bpf_dsl_forward.h", |
| 229 "bpf_dsl/bpf_dsl_impl.h", | 219 "bpf_dsl/bpf_dsl_impl.h", |
| 230 "bpf_dsl/codegen.cc", | 220 "bpf_dsl/codegen.cc", |
| 231 "bpf_dsl/codegen.h", | 221 "bpf_dsl/codegen.h", |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 "suid/client/setuid_sandbox_host.cc", | 437 "suid/client/setuid_sandbox_host.cc", |
| 448 "suid/client/setuid_sandbox_host.h", | 438 "suid/client/setuid_sandbox_host.h", |
| 449 "suid/common/sandbox.h", | 439 "suid/common/sandbox.h", |
| 450 "suid/common/suid_unsafe_environment_variables.h", | 440 "suid/common/suid_unsafe_environment_variables.h", |
| 451 ] | 441 ] |
| 452 } | 442 } |
| 453 } | 443 } |
| 454 } | 444 } |
| 455 | 445 |
| 456 if (is_android) { | 446 if (is_android) { |
| 457 create_native_executable_dist("sandbox_linux_unittests_deps") { | 447 # TODO(GYP) Delete this after we've converted everything to GN. |
| 448 group("sandbox_linux_unittests_deps") { |
| 458 testonly = true | 449 testonly = true |
| 459 dist_dir = "$root_out_dir/sandbox_linux_unittests_deps" | |
| 460 binary = "$root_out_dir/sandbox_linux_unittests" | |
| 461 deps = [ | 450 deps = [ |
| 462 ":sandbox_linux_unittests", | 451 ":sandbox_linux_unittests", |
| 463 ] | 452 ] |
| 464 | |
| 465 if (is_component_build) { | |
| 466 deps += [ "//build/android:cpplib_stripped" ] | |
| 467 } | |
| 468 } | |
| 469 | |
| 470 test_runner_script("sandbox_linux_unittests__test_runner_script") { | |
| 471 test_name = "sandbox_linux_unittests" | |
| 472 test_type = "gtest" | |
| 473 test_suite = "sandbox_linux_unittests" | |
| 474 isolate_file = "//sandbox/sandbox_linux_unittests_android.isolate" | |
| 475 } | 453 } |
| 476 } | 454 } |
| OLD | NEW |