| Index: chrome/test/data/nacl/BUILD.gn
|
| diff --git a/chrome/test/data/nacl/BUILD.gn b/chrome/test/data/nacl/BUILD.gn
|
| index 07e913558091c7ddd8e31b40fb88fcc4b10abfe8..bfec5fb8c98dafdfe23c6867d17ba6eac713636c 100644
|
| --- a/chrome/test/data/nacl/BUILD.gn
|
| +++ b/chrome/test/data/nacl/BUILD.gn
|
| @@ -2,15 +2,13 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| -import("//build/config/features.gni")
|
| import("//build/config/nacl/config.gni")
|
| -import("//build/config/nacl/rules.gni")
|
| +import("//ppapi/native_client/nacl_test_data.gni")
|
|
|
| group("nacl") {
|
| newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}"
|
| glibc = "//build/toolchain/nacl:glibc_${target_cpu}"
|
| pnacl = "//build/toolchain/nacl:newlib_pnacl"
|
| - nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
|
| deps = [
|
| ":exit_status_test($glibc)",
|
| ":exit_status_test($newlib)",
|
| @@ -19,10 +17,8 @@ group("nacl") {
|
| ":extension_validation_cache($newlib)",
|
| ":irt_exception_test($glibc)",
|
| ":irt_exception_test($newlib)",
|
| - ":irt_exception_test($nonsfi)",
|
| ":irt_exception_test($pnacl)",
|
| ":irt_manifest_file($newlib)",
|
| - ":irt_manifest_file($nonsfi)",
|
| ":partly_invalid($newlib)",
|
| ":pnacl_debug_url_test($pnacl)",
|
| ":pnacl_dyncode_syscall_disabled_test($pnacl)",
|
| @@ -68,7 +64,6 @@ group("nacl") {
|
| ":ppapi_progress_events($pnacl)",
|
| ":shared_test_files($glibc)",
|
| ":shared_test_files($newlib)",
|
| - ":shared_test_files($nonsfi)",
|
| ":shared_test_files($pnacl)",
|
| ":simple_test($glibc)",
|
| ":simple_test($newlib)",
|
| @@ -77,242 +72,22 @@ group("nacl") {
|
| ":sysconf_nprocessors_onln_test($newlib)",
|
| ":sysconf_nprocessors_onln_test($pnacl)",
|
| ]
|
| - if (is_linux && is_clang) {
|
| - deps += [ ":nonsfi_libc_free" ]
|
| + if (is_linux) {
|
| + nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
|
| + deps += [
|
| + ":irt_exception_test($nonsfi)",
|
| + ":irt_manifest_file($nonsfi)",
|
| + ":shared_test_files($nonsfi)",
|
| + ]
|
| + if (is_clang) {
|
| + deps += [ ":nonsfi_libc_free" ]
|
| + }
|
| }
|
| }
|
|
|
| if (is_nacl) {
|
| - template("nacl_test_data") {
|
| - if (current_cpu == "pnacl") {
|
| - if (is_nacl_nonsfi) {
|
| - variant = "nonsfi"
|
| - } else {
|
| - variant = "pnacl"
|
| - }
|
| - } else if (is_nacl_glibc) {
|
| - variant = "glibc"
|
| - } else {
|
| - variant = "newlib"
|
| - }
|
| -
|
| - if (defined(invoker.sources)) {
|
| - if (defined(invoker.output_name)) {
|
| - base_target_name = invoker.output_name
|
| - } else {
|
| - base_target_name = target_name
|
| - }
|
| -
|
| - if (current_cpu == "x64") {
|
| - nmf_cpu = "x86_64"
|
| - } else if (current_cpu == "x86") {
|
| - nmf_cpu = "x86_32"
|
| - } else {
|
| - nmf_cpu = current_cpu
|
| - }
|
| - if (is_nacl_glibc) {
|
| - suffix = "glibc_${nmf_cpu}"
|
| - } else {
|
| - suffix = "newlib_${nmf_cpu}"
|
| - }
|
| - suffixed_target_name = "${base_target_name}_${suffix}"
|
| -
|
| - if (defined(invoker.generate_nmf)) {
|
| - generate_nmf = invoker.generate_nmf
|
| - } else {
|
| - generate_nmf = true
|
| - }
|
| -
|
| - nexe_target_name = target_name + "_nexe"
|
| - if (is_nacl_nonsfi) {
|
| - pexe_translate_target_name = target_name + "_translate_pexe"
|
| - }
|
| - nexe_copy_target_name = target_name + "_copy_nexe"
|
| - if (generate_nmf) {
|
| - nmf_target_name = target_name + "_nmf"
|
| - }
|
| - }
|
| -
|
| - if (defined(invoker.test_files)) {
|
| - test_files_target_name = target_name + "_test_files"
|
| - }
|
| -
|
| - destination_dir = "nacl_test_data"
|
| - if (defined(invoker.destination_dir)) {
|
| - destination_dir += "/${invoker.destination_dir}"
|
| - }
|
| -
|
| - if (defined(invoker.sources)) {
|
| - executable(nexe_target_name) {
|
| - output_name = suffixed_target_name
|
| - sources = invoker.sources
|
| - forward_variables_from(invoker,
|
| - [
|
| - "cflags",
|
| - "ldflags",
|
| - "libs",
|
| - ])
|
| - deps = [
|
| - "//ppapi:ppapi_cpp_lib",
|
| - "//ppapi/native_client:ppapi_lib",
|
| - ]
|
| - ldflags = [ "-pthread" ]
|
| - if (defined(invoker.deps)) {
|
| - deps += invoker.deps
|
| - }
|
| - }
|
| -
|
| - if (is_nacl_nonsfi) {
|
| - action(pexe_translate_target_name) {
|
| - # We specify the toolchain explicitly because in the Non-SFI case, we
|
| - # still want to use the pexe built using the newlib_pnacl toolchain.
|
| - tests = ":$nexe_target_name(//build/toolchain/nacl:newlib_pnacl)"
|
| -
|
| - pexe = get_label_info(tests, "root_out_dir") +
|
| - "/${suffixed_target_name}.pexe"
|
| - if (target_cpu == "x86" || target_cpu == "x64") {
|
| - nmf_cpu = "x32"
|
| - } else {
|
| - nmf_cpu = target_cpu
|
| - }
|
| - nexe = "${root_out_dir}/${base_target_name}_pnacl_newlib_${nmf_cpu}_nonsfi.nexe"
|
| -
|
| - script = "${nacl_toolchain_bindir}/pydir/loader.py"
|
| - sources = [
|
| - pexe,
|
| - ]
|
| - outputs = [
|
| - nexe,
|
| - ]
|
| -
|
| - if (target_cpu == "x86" || target_cpu == "x64") {
|
| - arch = "x86-32-nonsfi"
|
| - } else if (target_cpu == "arm") {
|
| - arch = "arm-nonsfi"
|
| - }
|
| -
|
| - pnacl_irt_shim = "//ppapi/native_client/src/untrusted/pnacl_irt_shim:aot(//build/toolchain/nacl:newlib_pnacl_nonsfi)"
|
| -
|
| - args = [
|
| - "pnacl-translate",
|
| - rebase_path(pexe, root_build_dir),
|
| - "-o",
|
| - rebase_path(nexe, root_build_dir),
|
| - "-arch",
|
| - arch,
|
| - "-Wl,-L" +
|
| - rebase_path(get_label_info(pnacl_irt_shim, "target_out_dir")),
|
| - ]
|
| - deps = [
|
| - ":$nexe_target_name(//build/toolchain/nacl:newlib_pnacl)",
|
| - ]
|
| - data_deps = [
|
| - pnacl_irt_shim,
|
| - ]
|
| - }
|
| - }
|
| -
|
| - copy(nexe_copy_target_name) {
|
| - if (current_cpu == "pnacl" && !is_nacl_nonsfi) {
|
| - if (defined(invoker.nonstable_pexe) && invoker.nonstable_pexe) {
|
| - sources = [
|
| - "${root_out_dir}/exe.unstripped/${suffixed_target_name}.pexe",
|
| - ]
|
| - } else {
|
| - sources = [
|
| - "${root_out_dir}/${suffixed_target_name}.pexe",
|
| - ]
|
| - }
|
| - } else if (is_nacl_nonsfi) {
|
| - sources = get_target_outputs(":${pexe_translate_target_name}")
|
| - } else {
|
| - sources = [
|
| - "${root_out_dir}/${suffixed_target_name}.nexe",
|
| - ]
|
| - }
|
| - outputs = [
|
| - "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}",
|
| - ]
|
| - if (is_nacl_nonsfi) {
|
| - deps = [
|
| - ":${pexe_translate_target_name}",
|
| - ]
|
| - } else {
|
| - deps = [
|
| - ":${nexe_target_name}",
|
| - ]
|
| - }
|
| - }
|
| - }
|
| -
|
| - if (defined(invoker.sources) && generate_nmf) {
|
| - if (is_nacl_nonsfi) {
|
| - generate_nonsfi_test_nmf(nmf_target_name) {
|
| - nmf = "${root_build_dir}/${destination_dir}/${variant}/${base_target_name}.nmf"
|
| - files = get_target_outputs(":${nexe_copy_target_name}")
|
| - executable = files[0]
|
| - if (defined(invoker.nmfflags)) {
|
| - nmfflags = invoker.nmfflags
|
| - }
|
| - deps = [
|
| - ":${nexe_copy_target_name}",
|
| - ]
|
| - }
|
| - } else {
|
| - generate_nmf(nmf_target_name) {
|
| - nmf = "${root_build_dir}/${destination_dir}/${variant}/${base_target_name}.nmf"
|
| - if (current_cpu == "pnacl") {
|
| - executables = [ "${root_build_dir}/${destination_dir}/${variant}/${suffixed_target_name}.pexe" ]
|
| - } else {
|
| - executables = [ "${root_build_dir}/${destination_dir}/${variant}/${suffixed_target_name}.nexe" ]
|
| - }
|
| - if (is_nacl_glibc) {
|
| - lib_prefix = "${base_target_name}_libs"
|
| - stage_dependencies =
|
| - "${root_build_dir}/${destination_dir}/${variant}"
|
| - }
|
| - if (defined(invoker.nmfflags)) {
|
| - nmfflags = invoker.nmfflags
|
| - }
|
| - deps = [
|
| - ":${nexe_copy_target_name}",
|
| - ]
|
| - }
|
| - }
|
| - }
|
| -
|
| - if (defined(invoker.test_files)) {
|
| - copy(test_files_target_name) {
|
| - sources = invoker.test_files
|
| - outputs = [
|
| - "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}",
|
| - ]
|
| - deps = []
|
| - if (defined(invoker.sources)) {
|
| - deps += [ ":${nexe_target_name}" ]
|
| - }
|
| - if (defined(invoker.files_deps)) {
|
| - deps += invoker.files_deps
|
| - }
|
| - }
|
| - }
|
| -
|
| - group(target_name) {
|
| - data_deps = []
|
| - if (defined(invoker.sources)) {
|
| - data_deps += [ ":${nexe_copy_target_name}" ]
|
| - if (generate_nmf) {
|
| - data_deps += [ ":${nmf_target_name}" ]
|
| - }
|
| - }
|
| - if (defined(invoker.test_files)) {
|
| - data_deps += [ ":${test_files_target_name}" ]
|
| - }
|
| - }
|
| - }
|
| -
|
| - nacl_test_data("shared_test_files") {
|
| - test_files = [
|
| + copy("shared_test_files") {
|
| + sources = [
|
| # TODO(ncbray) move into chrome/test/data/nacl when all tests are
|
| # converted.
|
| "//ppapi/native_client/tools/browser_tester/browserdata/nacltest.js",
|
| @@ -320,23 +95,26 @@ if (is_nacl) {
|
| # Files that aren't associated with any particular executable.
|
| "bad/ppapi_bad.html",
|
| "bad/ppapi_bad.js",
|
| - "bad/ppapi_bad_native.html",
|
| "bad/ppapi_bad_doesnotexist.nmf",
|
| "bad/ppapi_bad_magic.nmf",
|
| - "bad/ppapi_bad_manifest_uses_nexes.nmf",
|
| "bad/ppapi_bad_manifest_bad_files.nmf",
|
| "bad/ppapi_bad_manifest_nexe_arch.nmf",
|
| + "bad/ppapi_bad_manifest_uses_nexes.nmf",
|
| + "bad/ppapi_bad_native.html",
|
| "crash/ppapi_crash.js",
|
| - "crash/ppapi_crash_via_check_failure.html",
|
| - "crash/ppapi_crash_via_exit_call.html",
|
| "crash/ppapi_crash_in_callback.html",
|
| - "crash/ppapi_crash_ppapi_off_main_thread.html",
|
| "crash/ppapi_crash_off_main_thread.html",
|
| + "crash/ppapi_crash_ppapi_off_main_thread.html",
|
| + "crash/ppapi_crash_via_check_failure.html",
|
| + "crash/ppapi_crash_via_exit_call.html",
|
| "load_util.js",
|
| "manifest_file/test_file.txt",
|
| "progress_event_listener.js",
|
| "simple_cc.js",
|
| ]
|
| + outputs = [
|
| + "${root_build_dir}/nacl_test_data/${nacl_toolchain_variant}/{{source_file_part}}",
|
| + ]
|
| }
|
|
|
| source_set("ppapi_test_lib") {
|
| @@ -371,6 +149,7 @@ if (is_nacl) {
|
| # a test case where there is a manifest entry, but no actual file.
|
| "-xdummy_test_file:dummy_test_file.txt",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "manifest_file/irt_manifest_file_test.html" ]
|
| }
|
|
|
| @@ -382,6 +161,7 @@ if (is_nacl) {
|
| ":ppapi_test_lib",
|
| ]
|
| libs = [ "nacl_exception" ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "irt_exception/irt_exception_test.html" ]
|
| }
|
| }
|
| @@ -392,6 +172,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "simple.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "nacl_load_test.html" ]
|
| }
|
|
|
| @@ -400,6 +181,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "exit_status/pm_exit_status_test.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "exit_status/pm_exit_status_test.html" ]
|
| }
|
|
|
| @@ -410,7 +192,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
|
|
| # Need a new directory to not clash with with other extension
|
| # tests's files (e.g., manifest.json).
|
| - destination_dir = "extension_vcache_test"
|
| + destination_dir = "nacl_test_data/extension_vcache_test"
|
| test_files = [
|
| # TODO(ncbray) move into chrome/test/data/nacl when all tests are
|
| # converted.
|
| @@ -431,6 +213,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files =
|
| [ "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.html" ]
|
| }
|
| @@ -439,6 +222,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "progress_events/ppapi_progress_events.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "progress_events/ppapi_progress_events.html" ]
|
| deps = [
|
| ":ppapi_test_lib",
|
| @@ -449,12 +233,14 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "bad/ppapi_bad_ppp_initialize.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_bad_ppp_initialize_crash") {
|
| sources = [
|
| "bad/ppapi_bad_ppp_initialize_crash.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_bad_no_ppp_instance") {
|
| @@ -464,30 +250,35 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| deps = [
|
| "//native_client/src/shared/platform",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_bad_get_ppp_instance_crash") {
|
| sources = [
|
| "bad/ppapi_bad_get_ppp_instance_crash.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_bad_ppp_instance_didcreate") {
|
| sources = [
|
| "bad/ppapi_bad_ppp_instance_didcreate.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_bad_ppp_instance_didcreate_crash") {
|
| sources = [
|
| "bad/ppapi_bad_ppp_instance_didcreate_crash.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| }
|
|
|
| nacl_test_data("ppapi_crash_via_check_failure") {
|
| sources = [
|
| "crash/ppapi_crash_via_check_failure.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| @@ -497,6 +288,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "crash/ppapi_crash_via_exit_call.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| @@ -506,6 +298,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "crash/ppapi_crash_in_callback.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| @@ -515,6 +308,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "crash/ppapi_crash_off_main_thread.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| @@ -524,6 +318,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "crash/ppapi_crash_ppapi_off_main_thread.cc",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| @@ -536,6 +331,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [
|
| "extension_mime_handler/ppapi_extension_mime_handler.html",
|
| "extension_mime_handler/mime_test_data.dat",
|
| @@ -555,6 +351,10 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| "simple.cc",
|
| ]
|
| generate_nmf = false
|
| + if (current_cpu == "pnacl") {
|
| + debug_pexe = true
|
| + }
|
| + destination_dir = "nacl_test_data"
|
| test_files = [
|
| "pnacl_debug_url/pnacl_debug_url.html",
|
| "pnacl_debug_url/pnacl_has_debug.nmf",
|
| @@ -572,6 +372,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| if (current_cpu == "pnacl") {
|
| nonstable_pexe = true
|
| }
|
| + destination_dir = "nacl_test_data"
|
| test_files = [
|
| "pnacl_error_handling/pnacl_error_handling.html",
|
| "pnacl_error_handling/bad.pexe",
|
| @@ -583,8 +384,13 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| ]
|
| }
|
|
|
| - nacl_test_data("pnacl_mime_type_test") {
|
| - test_files = [ "pnacl_mime_type/pnacl_mime_type.html" ]
|
| + copy("pnacl_mime_type_test") {
|
| + sources = [
|
| + "pnacl_mime_type/pnacl_mime_type.html",
|
| + ]
|
| + outputs = [
|
| + "${root_build_dir}/nacl_test_data/${nacl_toolchain_variant}/{{source_file_part}}",
|
| + ]
|
| }
|
|
|
| nacl_test_data("pnacl_options_test") {
|
| @@ -593,6 +399,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| "simple.cc",
|
| ]
|
| generate_nmf = false
|
| + destination_dir = "nacl_test_data"
|
| test_files = [
|
| "pnacl_nmf_options/pnacl_options.html",
|
| "pnacl_nmf_options/pnacl_o_0.nmf",
|
| @@ -610,6 +417,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| ":ppapi_test_lib",
|
| "//native_client/src/untrusted/nacl:nacl_dyncode_private",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files =
|
| [ "pnacl_dyncode_syscall_disabled/pnacl_dyncode_syscall_disabled.html" ]
|
| }
|
| @@ -623,6 +431,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| ":ppapi_test_lib",
|
| "//native_client/src/untrusted/nacl:nacl_exception_private",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "pnacl_hw_eh_disabled/pnacl_hw_eh_disabled.html" ]
|
| }
|
|
|
| @@ -634,6 +443,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "ppapi/ppb_core/ppapi_ppb_core.html" ]
|
| }
|
|
|
| @@ -644,6 +454,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [ "ppapi/ppb_instance/ppapi_ppb_instance.html" ]
|
| }
|
|
|
| @@ -654,6 +465,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| deps = [
|
| ":ppapi_test_lib",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| test_files = [
|
| "ppapi/ppp_instance/ppapi_ppp_instance.html",
|
| "ppapi/ppp_instance/ppapi_ppp_instance.js",
|
| @@ -666,6 +478,7 @@ if (is_nacl && !is_nacl_nonsfi) {
|
| sources = [
|
| "//native_client/tests/stubout_mode/partly_invalid.c",
|
| ]
|
| + destination_dir = "nacl_test_data"
|
| if (target_cpu == "mipsel") {
|
| cflags = [
|
| "--pnacl-mips-bias",
|
|
|