| # 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/test.gni") |
| |
| # Provides a C++ utility function GetCoordinator() which connects to and |
| # interacts with the fuchsia.hardware.display.Provider service, found within |
| # the component's environment. |
| source_set("client") { |
| sources = [ |
| "client.cc", |
| "client.h", |
| ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display_cpp", |
| "//sdk/lib/fit-promise", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/files", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| # Test the client getting display Coordinator without access to display.Provider |
| # service. |
| test("get_hardware_display_coordinator_without_provider_service_test_bin") { |
| sources = [ |
| "tests/get_hardware_display_coordinator_without_provider_service_test.cc", |
| ] |
| |
| deps = [ |
| ":client", |
| "//sdk/lib/fit-promise", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_package( |
| "get_hardware_display_coordinator_without_provider_service_test") { |
| deps = |
| [ ":get_hardware_display_coordinator_without_provider_service_test_bin" ] |
| manifest = "tests/meta/get_hardware_display_coordinator_without_provider_service_test.cml" |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| # Test the client getting display Coordinator with access to display.Provider |
| # service. |
| test("get_hardware_display_coordinator_with_provider_service_test_bin") { |
| sources = |
| [ "tests/get_hardware_display_coordinator_with_provider_service_test.cc" ] |
| |
| deps = [ |
| ":client", |
| "//sdk/lib/fit-promise", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_package( |
| "get_hardware_display_coordinator_with_provider_service_test") { |
| deps = [ |
| ":get_hardware_display_coordinator_with_provider_service_test_bin", |
| "//src/graphics/display/testing/fake-coordinator-connector:child-component", |
| ] |
| manifest = "tests/meta/get_hardware_display_coordinator_with_provider_service_test.cml" |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_type = "vulkan" |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":get_hardware_display_coordinator_with_provider_service_test", |
| ":get_hardware_display_coordinator_without_provider_service_test", |
| ] |
| } |