blob: dba9c26fb5604b5a3714faa8f2f4b5f24479b886 [file] [log] [blame] [edit]
# Copyright 2022 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")
executable("bin") {
testonly = true
output_name = "test-ui-stack"
sources = [ "main.cc" ]
deps = [
":test_ui_stack_config_lib",
"//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_hlcpp",
"//sdk/fidl/fuchsia.element:fuchsia.element_hlcpp",
"//sdk/fidl/fuchsia.input.interaction:fuchsia.input.interaction_hlcpp",
"//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp",
"//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_hlcpp",
"//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_hlcpp",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_hlcpp",
"//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_hlcpp",
"//sdk/fidl/fuchsia.ui.pointerinjector:fuchsia.ui.pointerinjector_hlcpp",
"//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_hlcpp",
"//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_hlcpp",
"//sdk/fidl/fuchsia.ui.test.scene:fuchsia.ui.test.scene_hlcpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/ui/input-synthesis:test.inputsynthesis_hlcpp",
"//src/ui/testing/ui_test_realm",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("test-ui-stack-component") {
testonly = true
component_name = "test-ui-stack"
manifest = "meta/test-ui-stack.cml"
deps = [ ":bin" ]
}
# Required for structured config.
fuchsia_component_manifest("test_ui_stack_manifest") {
testonly = true
component_name = "test-ui-stack"
manifest = "meta/test-ui-stack.cml"
}
fuchsia_structured_config_cpp_elf_lib("test_ui_stack_config_lib") {
testonly = true
cm_label = ":test_ui_stack_manifest"
}
fuchsia_structured_config_values("gfx_scene_manager_config") {
testonly = true
cm_label = ":test_ui_stack_manifest"
values = {
use_flatland = false
display_rotation = 0
device_pixel_ratio = "1.0"
}
}
fuchsia_structured_config_values("flatland_scene_manager_config") {
testonly = true
cm_label = ":test_ui_stack_manifest"
values = {
use_flatland = true
display_rotation = 0
device_pixel_ratio = "1.0"
}
}
# This package is identical to :gfx-scene-manager-test-ui-stack below.
#
# I chose to preserve a separate generic "test-ui-stack" package to
# encourage clients to use this package moniker when they intend to
# override the configuration.
fuchsia_package("test-ui-stack") {
testonly = true
deps = [
":gfx_scene_manager_config",
":test-ui-stack-component",
]
}
# *** Begin pre-packaged UI stack permutations ***
#
# The packages below contain specific configurations of the UI stack.
#
# Please ONLY use them if:
# (1) Your test needs to include a specific flavor of the UI stack
# statically, i.e. in the test's .cml as oppposed to RealmBuilder,
#
# AND
#
# (2) You cannot build your own test ui stack package with an override
# config file.
fuchsia_package("gfx-scene-manager-test-ui-stack") {
testonly = true
deps = [
":gfx_scene_manager_config",
":test-ui-stack-component",
]
}
fuchsia_package("flatland-scene-manager-test-ui-stack") {
testonly = true
deps = [
":flatland_scene_manager_config",
":test-ui-stack-component",
]
}
# *** End pre-packaged UI stack permutations ***
group("test-ui-stack-flavors") {
testonly = true
deps = [
":flatland-scene-manager-test-ui-stack",
":gfx-scene-manager-test-ui-stack",
":test-ui-stack",
]
}