blob: e19ec058acc3a0c74ed31e73a5e93129c9aec230 [file] [log] [blame]
# 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/zircon/c_utils.gni")
import("//sdk/cts/build/cts.gni")
group("tests_no_e2e") {
testonly = true
assert_no_deps = e2e_test_libs
deps = [
"fidl:tests",
"pkg:tests",
# Tests not under //sdk/cts/...
# TODO: Fix the below test in the CTS release
#"//src/sys/component_manager/tests/collections:collections_integration_test",
"//src/sys/component_manager/tests/reboot_on_terminate:tests",
]
# TODO(jcecil): add back tools tests once we're able to execute them OOT.
path = get_label_info(":${target_name}", "dir")
is_cts_tot = string_replace(path, "//sdk/cts", "") != path
if (is_cts_tot) {
deps += [ "tools:tests_no_e2e" ]
}
}
group("e2e_tests") {
testonly = true
deps = []
# TODO(jcecil): add back tools tests once we're able to execute them OOT.
path = get_label_info(":${target_name}", "dir")
is_cts_tot = string_replace(path, "//sdk/cts", "") != path
if (is_cts_tot) {
deps += [ "tools:e2e_tests" ]
}
}
group("tests") {
testonly = true
deps = [
":e2e_tests",
":tests_no_e2e",
]
}
cts_unstripped_binaries_file = "$root_out_dir/cts_unstripped_binaries.list"
link_output_rspfile("cts_unstripped_binaries_list") {
testonly = true
outputs = [ cts_unstripped_binaries_file ]
deps = [
# TODO(chok): This currently contains a superset of unstripped binaries.
# We will want to create a smaller group which only contains cts_executable()'s.
":tests",
]
}
action("fidl_mangled_to_api_mapping") {
testonly = true
sources = [ cts_unstripped_binaries_file ]
deps = [ ":cts_unstripped_binaries_list" ]
script = "//sdk/cts/build/scripts/fidl_api_mapper.py"
depfile = "$target_gen_dir/$target_name.dd"
outputs = [ "$root_out_dir/fidl_mangled_to_api_mapping.json" ]
args = [
"--input",
rebase_path(sources[0], root_build_dir),
"--output",
rebase_path(outputs[0], root_build_dir),
"--depfile",
rebase_path(depfile, root_build_dir),
"--dwarfdump",
rebase_path("$clang_prefix/llvm-dwarfdump", root_build_dir),
]
}
cts_copy_to_sdk("build") {
sources = [ "BUILD.gn" ]
testonly = true
}
sdk_molecule("test_sdks") {
deps = [
":build_sdk",
"fidl:test_sdks",
"pkg:test_sdks",
# TODO(johnshamoon): Enable this when our Dart toolchain is sorted.
# "tools:test_sdks",
# Tests not under //sdk/cts/...
"//src/sys/component_manager/tests/collections:test_sdks",
]
testonly = true
}