| # 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/components.gni") | |
| import("//build/testing/cc_test_executable.gni") | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":driver-component-cpp-tests" ] | |
| } | |
| # The unit tests stay in GN: they depend on | |
| # //src/lib/diagnostics/fake-log-sink/cpp, which is not built by Bazel yet. | |
| cc_test_executable("cpp_test") { | |
| testonly = true | |
| sources = [ | |
| "tests/driver_base2_test.cc", | |
| "tests/driver_base_test.cc", | |
| "tests/driver_fidl_test.cc", | |
| "tests/fixture_based_tests.cc", | |
| "tests/health_alert_latch_test.cc", | |
| "tests/logger_test.cc", | |
| "tests/namespace_test.cc", | |
| "tests/node_add_args_test.cc", | |
| "tests/start_args_test.cc", | |
| "tests/test_driver.cc", | |
| "tests/test_driver.h", | |
| ] | |
| deps = [ | |
| ":cpp", | |
| ":test_base", | |
| "tests/fidl:fuchsia.driver.component.test_cpp", | |
| "//sdk/fidl/fuchsia.device.fs:fuchsia.device.fs_hlcpp", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_hlcpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/async_patterns/testing/cpp", | |
| "//sdk/lib/component/outgoing/cpp", | |
| "//sdk/lib/driver/compat/cpp", | |
| "//sdk/lib/driver/devfs/cpp", | |
| "//sdk/lib/driver/runtime:driver_runtime_cpp", | |
| "//sdk/lib/driver/testing/cpp", | |
| "//sdk/lib/driver/testing/cpp:minimal_compat_environment", | |
| "//src/devices/lib/driver:driver_runtime", | |
| "//src/lib/diagnostics/fake-log-sink/cpp", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//src/lib/testing/loop_fixture", | |
| "//src/lib/testing/predicates", | |
| "//third_party/googletest:gmock", | |
| "//zircon/system/ulib/inspect", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| # 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_package("driver-component-cpp-tests") { | |
| manifest = "meta/cpp_test.cml" | |
| deps = [ ":cpp_test" ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| sdk_source_set("cpp") { | |
| sources = [ | |
| "completer.cc", | |
| "driver_base2.cc", | |
| "health_alert_latch.cc", | |
| "node_add_args.cc", | |
| ] | |
| public = [ | |
| "driver_base.h", | |
| "driver_base2.h", | |
| "driver_export.h", | |
| "driver_export2.h", | |
| "health_alert_latch.h", | |
| "node_add_args.h", | |
| "node_offers.h", | |
| "prepare_stop_completer.h", | |
| "resume_completer.h", | |
| "start_completer.h", | |
| "stop_completer.h", | |
| "suspend_completer.h", | |
| ] | |
| sdk_area = "Driver SDK" | |
| category = "partner" | |
| sdk_headers_for_internal_use = [ | |
| "internal/concepts.h", | |
| "internal/driver_server2.h", | |
| "internal/start_args.h", | |
| "internal/symbols.h", | |
| ] | |
| public += [ | |
| "internal/concepts.h", | |
| "internal/driver_server2.h", | |
| "internal/start_args.h", | |
| "internal/symbols.h", | |
| ] | |
| sdk_name = "driver_component_cpp" | |
| include_base = "//sdk" | |
| public_configs = [ "//sdk/config" ] | |
| stable = true | |
| visibility = [ "//*" ] | |
| public_deps = [ | |
| ":node", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp", | |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_cpp", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/driver/incoming/cpp", | |
| "//sdk/lib/driver/logging/cpp", | |
| "//sdk/lib/driver/node/cpp", | |
| "//sdk/lib/driver/outgoing/cpp", | |
| "//sdk/lib/driver/runtime:driver_runtime_cpp", | |
| "//sdk/lib/driver/symbols", | |
| "//sdk/lib/fidl", | |
| "//sdk/lib/fidl_driver", | |
| "//sdk/lib/inspect/component/cpp", | |
| "//sdk/lib/stdcompat", | |
| ] | |
| } | |
| sdk_source_set("node") { | |
| public = [ | |
| "composite_node_spec.h", | |
| "node_properties.h", | |
| "node_wire_properties.h", | |
| ] | |
| sdk_area = "Driver SDK" | |
| category = "partner" | |
| sdk_name = "driver_component_node" | |
| include_base = "//sdk" | |
| public_configs = [ "//sdk/config" ] | |
| stable = true | |
| visibility = [ | |
| ":*", | |
| "//sdk/lib/driver/devicetree/*", | |
| "//vendor/google/*", | |
| ] | |
| public_deps = [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp", | |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_cpp", | |
| ] | |
| } | |
| source_set("test_base") { | |
| sources = [ "tests/test_base.cc" ] | |
| public = [ "tests/test_base.h" ] | |
| visibility = [ | |
| ":*", | |
| "//sdk/lib/driver/devfs/cpp:*", | |
| ] | |
| public_deps = [ | |
| ":cpp", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_hlcpp", | |
| "//sdk/lib/fit-promise", | |
| ] | |
| } |