OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 | 8 |
9 assert(enable_nacl) | 9 assert(enable_nacl) |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 "run_all_unittests.cc", | 68 "run_all_unittests.cc", |
69 ] | 69 ] |
70 | 70 |
71 deps = [ | 71 deps = [ |
72 ":loader", | 72 ":loader", |
73 "//base/test:test_support", | 73 "//base/test:test_support", |
74 "//ipc:test_support", | 74 "//ipc:test_support", |
75 "//ppapi/c", | 75 "//ppapi/c", |
76 "//testing/gtest", | 76 "//testing/gtest", |
77 ] | 77 ] |
| 78 |
| 79 if (is_nacl_nonsfi) { |
| 80 sources += [ |
| 81 # TODO(hamaji): Currently, we build them twice. Stop building |
| 82 # them for components_unittests. See crbug.com/364751 |
| 83 "nonsfi/nonsfi_sandbox_sigsys_unittest.cc", |
| 84 "nonsfi/nonsfi_sandbox_unittest.cc", |
| 85 ] |
| 86 |
| 87 deps += [ |
| 88 ":nacl_linux", |
| 89 "//sandbox/linux:sandbox_linux_test_utils", |
| 90 ] |
| 91 } |
78 } | 92 } |
79 | 93 |
80 if (is_linux) { | 94 if (is_linux) { |
81 executable("nacl_helper") { | 95 executable("nacl_helper") { |
82 sources = [ | 96 sources = [ |
83 "nacl_helper_linux.cc", | 97 "nacl_helper_linux.cc", |
84 "nacl_helper_linux.h", | 98 "nacl_helper_linux.h", |
85 ] | 99 ] |
86 | 100 |
87 deps = [ | 101 deps = [ |
(...skipping 19 matching lines...) Expand all Loading... |
107 | 121 |
108 # For setting up nacl_helper. | 122 # For setting up nacl_helper. |
109 source_set("nacl_helper_integration") { | 123 source_set("nacl_helper_integration") { |
110 public = [ | 124 public = [ |
111 "nacl_helper_linux.h", | 125 "nacl_helper_linux.h", |
112 ] | 126 ] |
113 data_deps = [ | 127 data_deps = [ |
114 ":nacl_helper", | 128 ":nacl_helper", |
115 ] | 129 ] |
116 } | 130 } |
| 131 |
| 132 test("nacl_helper_nonsfi_unittests") { |
| 133 sources = [ |
| 134 "nonsfi/nacl_helper_nonsfi_unittests.cc", |
| 135 ] |
| 136 deps = [ |
| 137 "//base", |
| 138 "//base/test:test_launcher_nacl_nonsfi", |
| 139 ] |
| 140 } |
| 141 |
| 142 group("helper_nonsfi") { |
| 143 deps = [ |
| 144 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", |
| 145 ] |
| 146 } |
| 147 |
| 148 group("helper_nonsfi_unittests") { |
| 149 testonly = true |
| 150 data_deps = [ |
| 151 ":nacl_helper_nonsfi_unittests", |
| 152 ":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_pna
cl_nonsfi)", |
| 153 ] |
| 154 } |
| 155 |
| 156 # TODO(GYP): Delete this after we've converted everything to GN. |
| 157 # The _run targets exist only for compatibility w/ GYP. |
| 158 group("nacl_helper_nonsfi_unittests_run") { |
| 159 testonly = true |
| 160 data_deps = [ |
| 161 ":helper_nonsfi_unittests", |
| 162 ] |
| 163 } |
117 } | 164 } |
118 | 165 |
119 if (is_nacl_nonsfi) { | 166 if (is_nacl_nonsfi) { |
120 executable("nacl_helper_nonsfi_nexe") { | 167 executable("nacl_helper_nonsfi_nexe") { |
121 output_name = "nacl_helper_nonsfi" | 168 output_name = "nacl_helper_nonsfi" |
122 set_sources_assignment_filter([]) | 169 set_sources_assignment_filter([]) |
123 sources = [ | 170 sources = [ |
124 # TODO(brettw) can this just depend on //components/nacl/common? | 171 # TODO(brettw) can this just depend on //components/nacl/common? |
125 "../common/nacl_messages.cc", | 172 "../common/nacl_messages.cc", |
126 "../common/nacl_messages.h", | 173 "../common/nacl_messages.h", |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 sources = [ | 226 sources = [ |
180 "${root_out_dir}/nacl_helper_nonsfi", | 227 "${root_out_dir}/nacl_helper_nonsfi", |
181 ] | 228 ] |
182 outputs = [ | 229 outputs = [ |
183 "${root_build_dir}/{{source_file_part}}", | 230 "${root_build_dir}/{{source_file_part}}", |
184 ] | 231 ] |
185 deps = [ | 232 deps = [ |
186 ":nacl_helper_nonsfi_nexe", | 233 ":nacl_helper_nonsfi_nexe", |
187 ] | 234 ] |
188 } | 235 } |
| 236 |
| 237 test("nacl_helper_nonsfi_unittests_main") { |
| 238 sources = [ |
| 239 "nonsfi/nonsfi_sandbox_sigsys_unittest.cc", |
| 240 "nonsfi/nonsfi_sandbox_unittest.cc", |
| 241 "nonsfi/run_all_unittests.cc", |
| 242 ] |
| 243 deps = [ |
| 244 ":nacl_helper_nonsfi_sandbox", |
| 245 "//base", |
| 246 "//base/test:test_support", |
| 247 "//content", |
| 248 "//native_client/src/nonsfi/irt:nacl_sys_private", |
| 249 "//native_client/src/untrusted/nacl:nacl", |
| 250 "//sandbox/linux:sandbox", |
| 251 "//sandbox/linux:sandbox_linux_test_utils", |
| 252 "//sandbox/linux:sandbox_services_headers", |
| 253 "//testing/gtest", |
| 254 ] |
| 255 } |
| 256 |
| 257 copy("nacl_helper_nonsfi_unittests_main_copy") { |
| 258 testonly = true |
| 259 sources = [ |
| 260 "${root_out_dir}/nacl_helper_nonsfi_unittests_main", |
| 261 ] |
| 262 outputs = [ |
| 263 "${root_build_dir}/{{source_file_part}}", |
| 264 ] |
| 265 deps = [ |
| 266 ":nacl_helper_nonsfi_unittests_main", |
| 267 ] |
| 268 } |
189 } | 269 } |
190 | |
191 group("helper_nonsfi") { | |
192 deps = [ | |
193 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", | |
194 ] | |
195 } | |
OLD | NEW |