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

Unified Diff: ppapi/native_client/nacl_test_data.gni

Issue 1955173002: [gn] Use nacl_test_data template for PPAPI tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only include nacl_test_data when nacl is enabled Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/nacl_test_data.gni
diff --git a/ppapi/native_client/nacl_test_data.gni b/ppapi/native_client/nacl_test_data.gni
index 5437ae7b9531677ef425c69357e8ee922cb0333d..dccc08d0fb952e3082bfaf239a4f2cd966c43792 100644
--- a/ppapi/native_client/nacl_test_data.gni
+++ b/ppapi/native_client/nacl_test_data.gni
@@ -34,7 +34,6 @@ if (current_cpu == "pnacl") {
# nmfflags: additional flags for the nmf generator
template("nacl_test_data") {
assert(defined(invoker.sources))
- assert(defined(invoker.destination_dir))
forward_variables_from(invoker, [ "destination_dir" ])
if (defined(invoker.output_name)) {
@@ -43,6 +42,13 @@ template("nacl_test_data") {
output_name = target_name
}
+ if (defined(invoker.destination_dir)) {
Roland McGrath 2016/05/06 23:07:23 This needs a comment about why the cases differ.
Petr Hosek 2016/05/06 23:21:06 Done.
+ target_dir =
+ "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}"
+ } else {
+ target_dir = root_build_dir
+ }
+
if (current_cpu == "x64") {
nmf_cpu = "x86_64"
} else if (current_cpu == "x86") {
@@ -73,6 +79,16 @@ template("nacl_test_data") {
}
if (generate_nmf) {
nmf_target_name = target_name + "_nmf"
+ if (defined(invoker.destination_dir)) {
Roland McGrath 2016/05/06 23:07:23 It would be cleaner if this can be moved up to joi
Petr Hosek 2016/05/06 23:21:06 Done.
+ nmf_name = output_name
+ } else {
+ if (is_nacl_nonsfi) {
+ nacl_toolchain_name = "pnacl_${nacl_toolchain_variant}"
+ } else {
+ nacl_toolchain_name = nacl_toolchain_variant
+ }
+ nmf_name = "${output_name}_${nacl_toolchain_name}"
+ }
}
if (defined(invoker.test_files)) {
test_files_target_name = target_name + "_test_files"
@@ -85,6 +101,8 @@ template("nacl_test_data") {
sources = invoker.sources
forward_variables_from(invoker,
[
+ "defines",
Roland McGrath 2016/05/06 23:07:23 alphasort the list
Petr Hosek 2016/05/06 23:21:06 Done.
+ "include_dirs",
"cflags",
"ldflags",
"libs",
@@ -175,7 +193,7 @@ template("nacl_test_data") {
]
}
outputs = [
- "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}/{{source_file_part}}",
+ "${target_dir}/{{source_file_part}}",
]
if (is_nacl_nonsfi) {
deps = [
@@ -196,7 +214,7 @@ template("nacl_test_data") {
"${root_out_dir}/exe.unstripped/${suffixed_output_name}.pexe",
]
outputs = [
- "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}/{{source_name_part}}.pexe.debug",
+ "${target_dir}/{{source_name_part}}.pexe.debug",
]
deps = [
":$nexe_target_name",
@@ -210,7 +228,7 @@ template("nacl_test_data") {
generate_nonsfi_test_nmf(nmf_target_name) {
visibility = [ ":$final_target_name" ]
forward_variables_from(invoker, [ "nmfflags" ])
- nmf = "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}/${output_name}.nmf"
+ nmf = "${target_dir}/${nmf_name}.nmf"
files = get_target_outputs(":$nexe_copy_target_name")
executable = files[0]
deps = [
@@ -221,12 +239,11 @@ template("nacl_test_data") {
generate_nmf(nmf_target_name) {
visibility = [ ":$final_target_name" ]
forward_variables_from(invoker, [ "nmfflags" ])
- nmf = "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}/${output_name}.nmf"
+ nmf = "${target_dir}/${nmf_name}.nmf"
executables = get_target_outputs(":$nexe_copy_target_name")
if (is_nacl_glibc) {
lib_prefix = "${output_name}_libs"
- stage_dependencies =
- "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}"
+ stage_dependencies = target_dir
}
deps = [
":$nexe_copy_target_name",
@@ -240,7 +257,7 @@ template("nacl_test_data") {
visibility = [ ":$final_target_name" ]
sources = invoker.test_files
outputs = [
- "${root_build_dir}/${destination_dir}/${nacl_toolchain_variant}/{{source_file_part}}",
+ "${target_dir}/{{source_file_part}}",
]
}
}
« no previous file with comments | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698