summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-24 16:17:19 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-24 16:17:19 +0000
commit2ae892453109680699580853e78e89419bceb7a8 (patch)
tree854a93b5ea16332cf0817b545224b37e4a3ba440 /sandbox
parent441ec71580e34ddb2dd23811771191a6fe6f6f17 (diff)
downloadchromium_src-2ae892453109680699580853e78e89419bceb7a8.zip
chromium_src-2ae892453109680699580853e78e89419bceb7a8.tar.gz
chromium_src-2ae892453109680699580853e78e89419bceb7a8.tar.bz2
Seccomp sandbox: Add Gyp rules for building the test suite
This should work both standalone and inside the Chromium build. I have not included an action for running the tests, since having such an action does not seem to be common in the Chromium build. BUG=none TEST=seccomp_tests Review URL: http://codereview.chromium.org/2165001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/seccomp/seccomp.gyp30
1 files changed, 30 insertions, 0 deletions
diff --git a/sandbox/linux/seccomp/seccomp.gyp b/sandbox/linux/seccomp/seccomp.gyp
index ea22796..596be21 100644
--- a/sandbox/linux/seccomp/seccomp.gyp
+++ b/sandbox/linux/seccomp/seccomp.gyp
@@ -5,6 +5,7 @@
{
'variables': {
'chromium_code': 1,
+ 'seccomp_intermediate_dir': '<(INTERMEDIATE_DIR)/seccomp-sandbox',
},
'targets': [
{
@@ -53,6 +54,35 @@
],
},
{
+ 'target_name': 'seccomp_tests',
+ 'type': 'executable',
+ 'sources': [
+ 'tests/test_syscalls.cc',
+ ],
+ 'include_dirs': [
+ '.',
+ '<(seccomp_intermediate_dir)',
+ ],
+ 'dependencies': [
+ 'seccomp_sandbox',
+ ],
+ 'libraries': [
+ '-lpthread',
+ '-lutil', # For openpty()
+ ],
+ 'actions': [
+ {
+ 'action_name': 'make_test_list',
+ 'inputs': [
+ 'tests/list_tests.py',
+ 'tests/test_syscalls.cc',
+ ],
+ 'outputs': ['<(seccomp_intermediate_dir)/test-list.h'],
+ 'action': ['sh', '-c', 'python <(_inputs) > <(_outputs)'],
+ },
+ ],
+ },
+ {
'target_name': 'timestats',
'type': 'executable',
'sources': [