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

Unified Diff: sandbox/sandbox_linux.gypi

Issue 10635006: Seccomp BPF: initial structure for unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Have a global sandbox_linux_unittests that always builds Created 8 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
Index: sandbox/sandbox_linux.gypi
diff --git a/sandbox/sandbox_linux.gypi b/sandbox/sandbox_linux.gypi
index e03c5b501a942731edb698d9a91d11748489640a..fb313a695236bd30228dd6b8ab384a345f5bc1a4 100644
--- a/sandbox/sandbox_linux.gypi
+++ b/sandbox/sandbox_linux.gypi
@@ -4,6 +4,10 @@
{
'targets': [
+ # We have two principal targets: sandbox and sandbox_linux_unittests
+ # All other targets are listed as dependencies.
+ # FIXME(jln): for historial reasons, sandbox_linux is the setuid sandbox
+ # and is its own target.
Markus (顧孟勤) 2012/06/21 21:01:07 I am really not a GYP expert by a long shot, so yo
jln (very slow on Chromium) 2012/06/21 21:10:45 Yes, this is what this does: we always build tests
{
'target_name': 'sandbox',
'type': 'none',
@@ -16,26 +20,53 @@
'../seccompsandbox/seccomp.gyp:seccomp_sandbox',
],
}],
- # This does not include Android.
+ # Similarly, compile seccomp BPF when we support it
[ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
'type': 'static_library',
- # Compile seccomp mode 2 code on Linux
- 'sources': [
- 'linux/seccomp-bpf/sandbox_bpf.cc',
- 'linux/seccomp-bpf/sandbox_bpf.h',
- 'linux/seccomp-bpf/verifier.cc',
- 'linux/seccomp-bpf/verifier.h',
- ],
'dependencies': [
- '../base/base.gyp:base',
+ 'seccomp_bpf',
],
- 'include_dirs': [
- '..',
+ }],
+ ],
+ },
+ {
+ 'target_name': 'sandbox_linux_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'sandbox',
+ '../testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'linux/tests/unit_tests.cc',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'conditions': [
+ [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
+ 'sources': [
+ 'linux/seccomp-bpf/sandbox_bpf_unittest.cc'
],
}],
],
},
{
+ 'target_name': 'seccomp_bpf',
+ 'type': 'static_library',
+ 'sources': [
+ 'linux/seccomp-bpf/sandbox_bpf.cc',
+ 'linux/seccomp-bpf/sandbox_bpf.h',
+ 'linux/seccomp-bpf/verifier.cc',
+ 'linux/seccomp-bpf/verifier.h',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ {
# The setuid sandbox, for Linux
'target_name': 'chrome_sandbox',
'type': 'executable',
« sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc ('K') | « sandbox/linux/tests/unit_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698