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

Side by Side Diff: components/nacl/BUILD.gn

Issue 1497543006: GN: Build nacl_helper_nonsfi unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback incorporated Created 5 years 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
OLDNEW
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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("//build/config/ui.gni") 7 import("//build/config/ui.gni")
8 import("//testing/test.gni") 8 import("//testing/test.gni")
9 9
10 if (enable_nacl) { 10 if (enable_nacl) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 "loader/run_all_unittests.cc", 173 "loader/run_all_unittests.cc",
174 ] 174 ]
175 175
176 deps = [ 176 deps = [
177 ":nacl", 177 ":nacl",
178 "//base/test:test_support", 178 "//base/test:test_support",
179 "//ipc:test_support", 179 "//ipc:test_support",
180 "//ppapi/c", 180 "//ppapi/c",
181 "//testing/gtest", 181 "//testing/gtest",
182 ] 182 ]
183
184 if (is_nacl_nonsfi) {
185 sources += [
186 # TODO(hamaji): Currently, we build them twice. Stop building
187 # them for components_unittests. See crbug.com/364751
188 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc",
189 "loader/nonsfi/nonsfi_sandbox_unittest.cc",
190 ]
191
192 deps += [
193 ":nacl_linux",
194 "//sandbox/linux:sandbox_linux_test_utils",
195 ]
196 }
183 } 197 }
184 198
185 if (is_linux) { 199 if (is_linux) {
186 executable("nacl_helper") { 200 executable("nacl_helper") {
187 sources = [ 201 sources = [
188 "loader/nacl_helper_linux.cc", 202 "loader/nacl_helper_linux.cc",
189 "loader/nacl_helper_linux.h", 203 "loader/nacl_helper_linux.h",
190 ] 204 ]
191 205
192 deps = [ 206 deps = [
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 ] 255 ]
242 256
243 if (use_glib) { 257 if (use_glib) {
244 configs += [ "//build/config/linux:glib" ] 258 configs += [ "//build/config/linux:glib" ]
245 } 259 }
246 260
247 if (use_seccomp_bpf) { 261 if (use_seccomp_bpf) {
248 defines += [ "USE_SECCOMP_BPF" ] 262 defines += [ "USE_SECCOMP_BPF" ]
249 } 263 }
250 } 264 }
265
266 test("nacl_helper_nonsfi_unittests") {
267 sources = [
268 "loader/nonsfi/nacl_helper_nonsfi_unittests.cc",
269 ]
270 deps = [
271 "//base",
272 "//base/test:test_launcher_nacl_nonsfi",
273 ]
274 }
275
276 group("helper_nonsfi") {
277 deps = [
278 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
279 ]
280 }
281
282 group("helper_nonsfi_unittests") {
283 testonly = true
284 deps = [
285 ":nacl_helper_nonsfi_unittests",
286 ":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_p nacl_nonsfi)",
287 ]
288 }
251 } 289 }
252 290
253 if (is_nacl_nonsfi) { 291 if (is_nacl_nonsfi) {
254 executable("nacl_helper_nonsfi_nexe") { 292 executable("nacl_helper_nonsfi_nexe") {
255 output_name = "nacl_helper_nonsfi" 293 output_name = "nacl_helper_nonsfi"
256 set_sources_assignment_filter([]) 294 set_sources_assignment_filter([])
257 sources = [ 295 sources = [
258 "common/nacl_messages.cc", 296 "common/nacl_messages.cc",
259 "common/nacl_messages.h", 297 "common/nacl_messages.h",
260 "common/nacl_types.cc", 298 "common/nacl_types.cc",
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 sources = [ 344 sources = [
307 "${root_out_dir}/nacl_helper_nonsfi", 345 "${root_out_dir}/nacl_helper_nonsfi",
308 ] 346 ]
309 outputs = [ 347 outputs = [
310 "${root_build_dir}/{{source_file_part}}", 348 "${root_build_dir}/{{source_file_part}}",
311 ] 349 ]
312 deps = [ 350 deps = [
313 ":nacl_helper_nonsfi_nexe", 351 ":nacl_helper_nonsfi_nexe",
314 ] 352 ]
315 } 353 }
316 }
317 354
318 group("helper_nonsfi") { 355 test("nacl_helper_nonsfi_unittests_main") {
319 deps = [ 356 sources = [
320 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", 357 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc",
321 ] 358 "loader/nonsfi/nonsfi_sandbox_unittest.cc",
359 "loader/nonsfi/run_all_unittests.cc",
360 ]
361 deps = [
362 ":nacl_helper_nonsfi_sandbox",
363 "//base",
364 "//base/test:test_support_nonsfi",
365 "//content",
366 "//native_client/src/nonsfi/irt:nacl_sys_private",
367 "//native_client/src/untrusted/nacl:nacl",
368 "//sandbox/linux:sandbox",
369 "//sandbox/linux:sandbox_linux_test_utils",
370 "//sandbox/linux:sandbox_services_headers",
371 "//testing/gtest",
372 ]
373 }
374
375 copy("nacl_helper_nonsfi_unittests_main_copy") {
376 testonly = true
377 sources = [
378 "${root_out_dir}/nacl_helper_nonsfi_unittests_main",
379 ]
380 outputs = [
381 "${root_build_dir}/{{source_file_part}}",
382 ]
383 deps = [
384 ":nacl_helper_nonsfi_unittests_main",
385 ]
386 }
322 } 387 }
323 } 388 }
324 389
325 # TODO(brettw) move to //components/nacl/common:switches 390 # TODO(brettw) move to //components/nacl/common:switches
326 source_set("nacl_switches") { 391 source_set("nacl_switches") {
327 sources = [ 392 sources = [
328 "common/nacl_switches.cc", 393 "common/nacl_switches.cc",
329 "common/nacl_switches.h", 394 "common/nacl_switches.h",
330 ] 395 ]
331 } 396 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 430
366 if (is_linux) { 431 if (is_linux) {
367 sources += [ 432 sources += [
368 "common/nacl_paths.cc", 433 "common/nacl_paths.cc",
369 "common/nacl_paths.h", 434 "common/nacl_paths.h",
370 ] 435 ]
371 436
372 defines = [ "__STDC_LIMIT_MACROS=1" ] 437 defines = [ "__STDC_LIMIT_MACROS=1" ]
373 } 438 }
374 } 439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698