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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'targets': [ 6 'targets': [
7 # We have two principal targets: sandbox and sandbox_linux_unittests
8 # All other targets are listed as dependencies.
9 # FIXME(jln): for historial reasons, sandbox_linux is the setuid sandbox
10 # 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
7 { 11 {
8 'target_name': 'sandbox', 12 'target_name': 'sandbox',
9 'type': 'none', 13 'type': 'none',
10 'conditions': [ 14 'conditions': [
11 # Only compile in the seccomp mode 1 code for the flag combination 15 # Only compile in the seccomp mode 1 code for the flag combination
12 # where we support it. 16 # where we support it.
13 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64") ' 17 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64") '
14 'and toolkit_views==0 and selinux==0', { 18 'and toolkit_views==0 and selinux==0', {
15 'dependencies': [ 19 'dependencies': [
16 '../seccompsandbox/seccomp.gyp:seccomp_sandbox', 20 '../seccompsandbox/seccomp.gyp:seccomp_sandbox',
17 ], 21 ],
18 }], 22 }],
19 # This does not include Android. 23 # Similarly, compile seccomp BPF when we support it
20 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', { 24 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
21 'type': 'static_library', 25 'type': 'static_library',
22 # Compile seccomp mode 2 code on Linux
23 'sources': [
24 'linux/seccomp-bpf/sandbox_bpf.cc',
25 'linux/seccomp-bpf/sandbox_bpf.h',
26 'linux/seccomp-bpf/verifier.cc',
27 'linux/seccomp-bpf/verifier.h',
28 ],
29 'dependencies': [ 26 'dependencies': [
30 '../base/base.gyp:base', 27 'seccomp_bpf',
31 ],
32 'include_dirs': [
33 '..',
34 ], 28 ],
35 }], 29 }],
36 ], 30 ],
37 }, 31 },
38 { 32 {
33 'target_name': 'sandbox_linux_unittests',
34 'type': 'executable',
35 'dependencies': [
36 'sandbox',
37 '../testing/gtest.gyp:gtest',
38 ],
39 'sources': [
40 'linux/tests/unit_tests.cc',
41 ],
42 'include_dirs': [
43 '..',
44 ],
45 'conditions': [
46 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
47 'sources': [
48 'linux/seccomp-bpf/sandbox_bpf_unittest.cc'
49 ],
50 }],
51 ],
52 },
53 {
54 'target_name': 'seccomp_bpf',
55 'type': 'static_library',
56 'sources': [
57 'linux/seccomp-bpf/sandbox_bpf.cc',
58 'linux/seccomp-bpf/sandbox_bpf.h',
59 'linux/seccomp-bpf/verifier.cc',
60 'linux/seccomp-bpf/verifier.h',
61 ],
62 'dependencies': [
63 '../base/base.gyp:base',
64 ],
65 'include_dirs': [
66 '..',
67 ],
68 },
69 {
39 # The setuid sandbox, for Linux 70 # The setuid sandbox, for Linux
40 'target_name': 'chrome_sandbox', 71 'target_name': 'chrome_sandbox',
41 'type': 'executable', 72 'type': 'executable',
42 'sources': [ 73 'sources': [
43 'linux/suid/linux_util.c', 74 'linux/suid/linux_util.c',
44 'linux/suid/linux_util.h', 75 'linux/suid/linux_util.h',
45 'linux/suid/process_util.h', 76 'linux/suid/process_util.h',
46 'linux/suid/process_util_linux.c', 77 'linux/suid/process_util_linux.c',
47 'linux/suid/sandbox.h', 78 'linux/suid/sandbox.h',
48 'linux/suid/sandbox.c', 79 'linux/suid/sandbox.c',
49 ], 80 ],
50 'cflags': [ 81 'cflags': [
51 # For ULLONG_MAX 82 # For ULLONG_MAX
52 '-std=gnu99', 83 '-std=gnu99',
53 ], 84 ],
54 'include_dirs': [ 85 'include_dirs': [
55 '..', 86 '..',
56 ], 87 ],
57 }, 88 },
58 ], 89 ],
59 } 90 }
OLDNEW
« 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