| Index: sandbox/linux/BUILD.gn
|
| diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
|
| index 84966854cec7762df3530489d16dfacb818f14ed..6cca0d3806627aa1367c8a4d24ffb7e329e8b10a 100644
|
| --- a/sandbox/linux/BUILD.gn
|
| +++ b/sandbox/linux/BUILD.gn
|
| @@ -10,8 +10,8 @@ declare_args() {
|
|
|
| compile_credentials = is_linux
|
|
|
| - compile_seccomp_bpf_demo =
|
| - is_linux && (current_cpu == "x86" || current_cpu == "x64")
|
| + # On Android, use plain GTest.
|
| + use_base_test_suite = is_linux
|
| }
|
|
|
| # We have two principal targets: sandbox and sandbox_linux_unittests
|
| @@ -61,6 +61,11 @@ source_set("sandbox_linux_test_utils") {
|
| ]
|
| deps += [ ":seccomp_bpf" ]
|
| }
|
| +
|
| + if (use_base_test_suite) {
|
| + deps += [ "//base/test:test_support" ]
|
| + defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
|
| + }
|
| }
|
|
|
| # Sources shared by sandbox_linux_unittests and sandbox_linux_jni_unittests.
|
| @@ -88,10 +93,14 @@ source_set("sandbox_linux_unittests_sources") {
|
| ":sandbox",
|
| ":sandbox_linux_test_utils",
|
| "//base",
|
| - "//base/test:test_support",
|
| "//testing/gtest",
|
| ]
|
|
|
| + if (use_base_test_suite) {
|
| + deps += [ "//base/test:test_support" ]
|
| + defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
|
| + }
|
| +
|
| if (is_linux) {
|
| # Don't use this on Android.
|
| libs = [ "rt" ]
|
| @@ -124,10 +133,14 @@ source_set("sandbox_linux_unittests_sources") {
|
| sources += [
|
| "integration_tests/namespace_unix_domain_socket_unittest.cc",
|
| "services/credentials_unittest.cc",
|
| - "services/namespace_sandbox_unittest.cc",
|
| "services/namespace_utils_unittest.cc",
|
| ]
|
|
|
| + if (use_base_test_suite) {
|
| + # Tests that use advanced features not available in stock GTest.
|
| + sources += [ "services/namespace_sandbox_unittest.cc" ]
|
| + }
|
| +
|
| # For credentials_unittest.cc
|
| configs += [ "//build/config/linux:libcap" ]
|
| }
|
|
|