blob: a4b78a4dff2a5c9745ffd6fa39025f2436a86319 [file] [log] [blame]
# Copyright 2019 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/components.gni")
import("//build/test.gni")
group("tests") {
testonly = true
deps = [ ":sys_cpp_tests" ]
}
test("component_cpp_unittests_bin") {
sources = [
"component_context_unittest.cc",
"echo_server.h",
"outgoing_directory_unittest.cc",
"service_directory_unittest.cc",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp",
"//sdk/lib/fdio",
"//sdk/lib/fidl",
"//sdk/lib/sys/cpp",
"//sdk/lib/vfs/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/testing/fidl:placeholders_cpp",
"//src/testing/fidl:placeholders_hlcpp",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
# TODO(https://fxbug.dev/42176699): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_unittest_component("component_cpp_unittests") {
manifest = "meta/component_cpp_unittests.cml"
deps = [ ":component_cpp_unittests_bin" ]
}
test("component_cpp_testing_unittests_bin") {
sources = [
"component_context_provider_unittest.cc",
"echo_server.h",
"service_directory_provider_unittest.cc",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_hlcpp",
"//sdk/lib/fidl",
"//sdk/lib/sys/cpp/testing:unit",
"//sdk/lib/vfs/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/testing/fidl:placeholders_cpp",
"//src/testing/fidl:placeholders_hlcpp",
]
}
fuchsia_unittest_component("component_cpp_testing_unittests") {
deps = [ ":component_cpp_testing_unittests_bin" ]
manifest = "meta/component_cpp_testing_unittests.cml"
}
executable("constructor_helper_proc") {
testonly = true
sources = [ "constructor_helper.cc" ]
deps = [
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/lib/files",
"//src/lib/fxl:fxl_cli",
"//src/testing/fidl:placeholders_hlcpp",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_test_package("sys_cpp_tests") {
test_components = [
":component_cpp_testing_unittests",
":component_cpp_unittests",
]
deps = [ ":constructor_helper_proc" ]
}