Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: sandbox/linux/BUILD.gn

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/roll/update_from_chromium.py ('k') | sandbox/linux/bpf_dsl/codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/BUILD.gn
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index 84966854cec7762df3530489d16dfacb818f14ed..a1a77204f5f370a1a0c65c19a32b084e7e541b28 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" ]
}
@@ -298,6 +311,7 @@ source_set("sandbox_services_headers") {
"system_headers/linux_seccomp.h",
"system_headers/linux_signal.h",
"system_headers/linux_syscalls.h",
+ "system_headers/linux_time.h",
"system_headers/linux_ucontext.h",
"system_headers/x86_32_linux_syscalls.h",
"system_headers/x86_64_linux_syscalls.h",
« no previous file with comments | « mojo/tools/roll/update_from_chromium.py ('k') | sandbox/linux/bpf_dsl/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698