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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/BUILD.gn
diff --git a/components/nacl/BUILD.gn b/components/nacl/BUILD.gn
index 1addcfc4e21bd69e70eb57ad1bd9a4a9e71e8fec..5a22f3ea537758362f841233862a4b929b7ba33e 100644
--- a/components/nacl/BUILD.gn
+++ b/components/nacl/BUILD.gn
@@ -179,6 +179,20 @@ if (enable_nacl) {
"//ppapi/c",
"//testing/gtest",
]
+
+ if (is_nacl_nonsfi) {
+ sources += [
+ # TODO(hamaji): Currently, we build them twice. Stop building
+ # them for components_unittests. See crbug.com/364751
+ "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc",
+ "loader/nonsfi/nonsfi_sandbox_unittest.cc",
+ ]
+
+ deps += [
+ ":nacl_linux",
+ "//sandbox/linux:sandbox_linux_test_utils",
+ ]
+ }
}
if (is_linux) {
@@ -247,6 +261,16 @@ if (enable_nacl) {
defines += [ "USE_SECCOMP_BPF" ]
}
}
+
+ test("nacl_helper_nonsfi_unittests") {
+ sources = [
+ "loader/nonsfi/nacl_helper_nonsfi_unittests.cc",
+ ]
+ deps = [
+ "//base",
+ "//base/test:test_launcher_nacl_nonsfi",
+ ]
+ }
}
if (is_nacl_nonsfi) {
@@ -312,6 +336,38 @@ if (enable_nacl) {
":nacl_helper_nonsfi_nexe",
]
}
+
+ test("nacl_helper_nonsfi_unittests_main") {
+ sources = [
+ "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc",
+ "loader/nonsfi/nonsfi_sandbox_unittest.cc",
+ "loader/nonsfi/run_all_unittests.cc",
+ ]
+ deps = [
+ ":nacl_helper_nonsfi_sandbox",
+ "//base",
+ "//base/test:test_support_nonsfi",
+ "//content",
+ "//native_client/src/nonsfi/irt:nacl_sys_private",
+ "//native_client/src/untrusted/nacl:nacl",
+ "//sandbox/linux:sandbox",
+ "//sandbox/linux:sandbox_linux_test_utils",
+ "//testing/gtest",
+ ]
+ }
+
+ copy("nacl_helper_nonsfi_unittests_main_copy") {
+ testonly = true
+ sources = [
+ "${root_out_dir}/nacl_helper_nonsfi_unittests_main",
+ ]
+ outputs = [
+ "${root_build_dir}/{{source_file_part}}",
Mark Seaborn 2015/12/03 19:05:07 Does {{source_file_part}} expand to "nacl_helper_n
Petr Hosek 2015/12/04 05:57:46 Yes and no, this is the preferred GN way.
+ ]
+ deps = [
+ ":nacl_helper_nonsfi_unittests_main",
+ ]
+ }
}
group("helper_nonsfi") {
@@ -319,6 +375,14 @@ if (enable_nacl) {
":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
]
}
+
+ group("helper_nonsfi_unittests") {
+ testonly = true
+ deps = [
+ ":nacl_helper_nonsfi_unittests",
+ ":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
+ ]
+ }
}
# TODO(brettw) move to //components/nacl/common:switches

Powered by Google App Engine
This is Rietveld 408576698