| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/build_api_module.gni") |
| import("//sdk/cts/build/cts.gni") |
| |
| # TODO(fxb/82775): Remove this target once infra points to //sdk:cts. |
| group("cts_artifacts") { |
| testonly = true |
| |
| # build_api_module invocation moved to //sdk/cts/build/cts_sdk.gni |
| # and is hooked into the build from the //sdk:cts target. |
| |
| deps = [ "//sdk:cts" ] |
| } |
| |
| generated_file("generated_test_manifest") { |
| testonly = true |
| outputs = [ "$target_gen_dir/cts/test_manifest.json" ] |
| output_conversion = "json" |
| data_keys = [ "test_manifest" ] |
| deps = [ |
| "examples:tests", |
| "tests", |
| ] |
| } |
| |
| generated_file("generated_host_test_manifest") { |
| testonly = true |
| outputs = [ "$target_gen_dir/cts/host_test_manifest.json" ] |
| output_conversion = "json" |
| data_keys = [ "host_test_manifest" ] |
| |
| deps = [ "examples/host_tool:tests($host_toolchain)" ] |
| } |
| |
| cts_copy_to_sdk("test_manifest") { |
| testonly = true |
| dest = "" |
| sources = get_target_outputs(":generated_test_manifest") |
| non_sdk_deps = [ ":generated_test_manifest" ] |
| } |
| |
| cts_copy_to_sdk("host_test_manifest") { |
| testonly = true |
| dest = "" |
| sources = get_target_outputs(":generated_host_test_manifest") |
| non_sdk_deps = [ ":generated_host_test_manifest" ] |
| } |
| |
| sdk_molecule("test_manifest") { |
| testonly = true |
| deps = [ |
| ":host_test_manifest_sdk", |
| ":test_manifest_sdk", |
| ] |
| } |
| |
| group("cts_no_e2e") { |
| testonly = true |
| assert_no_deps = e2e_test_libs |
| |
| deps = [ "tests:tests_no_e2e" ] |
| |
| # Prevents us from adding example tests and build scripts to the archive. |
| path = get_label_info(":${target_name}", "dir") |
| is_cts_tot = string_replace(path, "//sdk/cts", "") != path |
| if (is_cts_tot) { |
| deps += [ |
| "build/scripts:tests", |
| "examples:tests_no_e2e", |
| ] |
| } |
| } |
| |
| group("cts") { |
| testonly = true |
| deps = [ |
| ":cts_no_e2e", |
| "examples:tests", |
| "tests", |
| ] |
| } |
| |
| cts_copy_to_sdk("build") { |
| sources = [ "BUILD.gn" ] |
| testonly = true |
| } |
| |
| # A manifest of the plasa elements that are vended in CTS. |
| generated_file("plasa_manifest") { |
| testonly = true |
| data_keys = [ "plasa" ] |
| outputs = [ "$root_build_dir/manifest.cts.plasa.json" ] |
| output_conversion = "json" |
| deps = [ "//sdk/fidl:plasa" ] |
| } |
| |
| # TODO(96106): Rename this to plasa_manifest_sdk. |
| cts_copy_to_sdk("plasa_manifest") { |
| testonly = true |
| sources = get_target_outputs(":plasa_manifest") |
| non_sdk_deps = [ ":plasa_manifest" ] |
| } |
| |
| # Vends a subset of the plasa in CTS. |
| sdk_molecule("plasa") { |
| testonly = true |
| category = "cts" |
| deps = [ |
| ":plasa_manifest_sdk", |
| "//sdk/fidl:plasa", |
| ] |
| } |
| |
| sdk_molecule("cts_tests") { |
| category = "cts" |
| deps = [ |
| ":build_sdk", |
| ":cts_deps", |
| ":test_manifest", |
| "tests:test_sdks", |
| "//sdk/testing/fidl:test_sdks", |
| ] |
| |
| # Prevents us from adding example tests to the archive. |
| path = get_label_info(":${target_name}", "dir") |
| is_cts_tot = string_replace(path, "//sdk/cts", "") != path |
| if (is_cts_tot) { |
| deps += [ "examples:test_sdks" ] |
| } |
| testonly = true |
| } |
| |
| sdk_molecule("cts_deps") { |
| category = "cts" |
| deps = [ "//zircon/public/sysroot/sdk:sysroot_sdk" ] |
| testonly = true |
| } |