| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 "bpf_dsl/golden/x86-64/NegativeConstantsPolicy.txt", | 185 "bpf_dsl/golden/x86-64/NegativeConstantsPolicy.txt", |
| 186 "bpf_dsl/golden/x86-64/SwitchPolicy.txt", | 186 "bpf_dsl/golden/x86-64/SwitchPolicy.txt", |
| 187 ] | 187 ] |
| 188 outputs = [ | 188 outputs = [ |
| 189 "$target_gen_dir/bpf_dsl/golden/golden_files.h", | 189 "$target_gen_dir/bpf_dsl/golden/golden_files.h", |
| 190 ] | 190 ] |
| 191 args = | 191 args = |
| 192 rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir) | 192 rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir) |
| 193 } | 193 } |
| 194 | 194 |
| 195 # TODO(GYP): Delete these after we've converted everything to GN. | 195 test("sandbox_linux_unittests") { |
| 196 # The _run targets exist only for compatibility w/ GYP. | |
| 197 group("sandbox_linux_unittests_run") { | |
| 198 testonly = true | |
| 199 deps = [ | |
| 200 ":sandbox_linux_unittests", | |
| 201 ] | |
| 202 } | |
| 203 | |
| 204 if (is_android) { | |
| 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 = [ | 196 deps = [ |
| 219 ":sandbox_linux_unittests_sources", | 197 ":sandbox_linux_unittests_sources", |
| 220 "//build/config/sanitizers:deps", | 198 "//build/config/sanitizers:deps", |
| 221 ] | 199 ] |
| 200 if (is_android) { |
| 201 use_raw_android_executable = true |
| 202 } |
| 222 } | 203 } |
| 223 | 204 |
| 224 component("seccomp_bpf") { | 205 component("seccomp_bpf") { |
| 225 sources = [ | 206 sources = [ |
| 226 "bpf_dsl/bpf_dsl.cc", | 207 "bpf_dsl/bpf_dsl.cc", |
| 227 "bpf_dsl/bpf_dsl.h", | 208 "bpf_dsl/bpf_dsl.h", |
| 228 "bpf_dsl/bpf_dsl_forward.h", | 209 "bpf_dsl/bpf_dsl_forward.h", |
| 229 "bpf_dsl/bpf_dsl_impl.h", | 210 "bpf_dsl/bpf_dsl_impl.h", |
| 230 "bpf_dsl/codegen.cc", | 211 "bpf_dsl/codegen.cc", |
| 231 "bpf_dsl/codegen.h", | 212 "bpf_dsl/codegen.h", |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 "suid/client/setuid_sandbox_host.cc", | 428 "suid/client/setuid_sandbox_host.cc", |
| 448 "suid/client/setuid_sandbox_host.h", | 429 "suid/client/setuid_sandbox_host.h", |
| 449 "suid/common/sandbox.h", | 430 "suid/common/sandbox.h", |
| 450 "suid/common/suid_unsafe_environment_variables.h", | 431 "suid/common/suid_unsafe_environment_variables.h", |
| 451 ] | 432 ] |
| 452 } | 433 } |
| 453 } | 434 } |
| 454 } | 435 } |
| 455 | 436 |
| 456 if (is_android) { | 437 if (is_android) { |
| 457 create_native_executable_dist("sandbox_linux_unittests_deps") { | 438 # TODO(GYP) Delete this after we've converted everything to GN. |
| 439 group("sandbox_linux_unittests_deps") { |
| 458 testonly = true | 440 testonly = true |
| 459 dist_dir = "$root_out_dir/sandbox_linux_unittests_deps" | |
| 460 binary = "$root_out_dir/sandbox_linux_unittests" | |
| 461 deps = [ | 441 deps = [ |
| 462 ":sandbox_linux_unittests", | 442 ":sandbox_linux_unittests", |
| 463 ] | 443 ] |
| 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 } | 444 } |
| 476 } | 445 } |
| OLD | NEW |