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

Unified Diff: sandbox/linux/BUILD.gn

Issue 1147463003: Linux sandbox: support build configuration without base test framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 7 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 | « no previous file | sandbox/linux/sandbox_linux.gypi » ('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..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" ]
}
« no previous file with comments | « no previous file | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698