summaryrefslogtreecommitdiffstats
path: root/sandbox/sandbox_linux.gypi
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 06:36:02 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 06:36:02 +0000
commitfafece1c7120bac8504f1702803121d53d29184b (patch)
treedc255f6accb9b728e2f7b0687d984da5c8d54469 /sandbox/sandbox_linux.gypi
parent88bfd25b311285e09b13a9c19c27eb6359a41c71 (diff)
downloadchromium_src-fafece1c7120bac8504f1702803121d53d29184b.zip
chromium_src-fafece1c7120bac8504f1702803121d53d29184b.tar.gz
chromium_src-fafece1c7120bac8504f1702803121d53d29184b.tar.bz2
Seccomp BPF: initial structure for unittests
- On Linux, support a new sandbox_linux_unittests target - Add a new seccomp_bpf_unittests target as a dependency of the global sandbox_linux_unittests target. - Integrate globally as a chromium_builder_tests dependency BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10635006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143549 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/sandbox_linux.gypi')
-rw-r--r--sandbox/sandbox_linux.gypi53
1 files changed, 42 insertions, 11 deletions
diff --git a/sandbox/sandbox_linux.gypi b/sandbox/sandbox_linux.gypi
index e03c5b5..fb313a6 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.
{
'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',