blob: 23420d78de452211b70bfa86841f155f0e3fce04 [file] [log] [blame] [edit]
# Copyright 2023 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/fidl/toolchain.gni")
import("//build/images/tools/fastboot.gni")
import("//build/python/python_library.gni")
import("//build/testing/host_test_data.gni")
group("honeydew") {
testonly = true
deps = [ ":honeydew_no_testonly" ]
}
python_library("honeydew_no_testonly") {
# In-tree-only tests should prefer ":honeydew" because that enforces that only
# testonly code uses regular Honeydew. This target should be used for tests or
# dependencies of tests that are packaged into the SDK, since they cannot be
# testonly.
visibility = [
":*",
"//src/testing/end_to_end/mobly_controller:*",
# SDK-based test targets listed below.
"//src/tests/end_to_end/rtc:*",
]
enable_mypy = true
library_name = "honeydew"
source_root = "//src/testing/end_to_end/honeydew/honeydew"
sources = [
"__init__.py",
"affordances/__init__.py",
"affordances/affordance.py",
"affordances/connectivity/wlan/__init__.py",
"affordances/connectivity/wlan/utils/errors.py",
"affordances/connectivity/wlan/utils/types.py",
"affordances/connectivity/wlan/wlan/__init__.py",
"affordances/connectivity/wlan/wlan/wlan.py",
"affordances/connectivity/wlan/wlan/wlan_using_fc.py",
"affordances/connectivity/wlan/wlan_policy/__init__.py",
"affordances/connectivity/wlan/wlan_policy/wlan_policy.py",
"affordances/connectivity/wlan/wlan_policy/wlan_policy_using_fc.py",
"affordances/connectivity/wlan/wlan_policy_ap/__init__.py",
"affordances/connectivity/wlan/wlan_policy_ap/wlan_policy_ap.py",
"affordances/connectivity/wlan/wlan_policy_ap/wlan_policy_ap_using_fc.py",
"affordances/ffx/__init__.py",
"affordances/ffx/inspect.py",
"affordances/ffx/session.py",
"affordances/ffx/ui/__init__.py",
"affordances/ffx/ui/screenshot.py",
"affordances/fuchsia_controller/__init__.py",
"affordances/fuchsia_controller/bluetooth/__init__.py",
"affordances/fuchsia_controller/bluetooth/bluetooth_common.py",
"affordances/fuchsia_controller/bluetooth/fidl_servers/bt_fidl_servers.py",
"affordances/fuchsia_controller/bluetooth/profiles/__init__.py",
"affordances/fuchsia_controller/bluetooth/profiles/bluetooth_gap.py",
"affordances/fuchsia_controller/bluetooth/profiles/bluetooth_le.py",
"affordances/fuchsia_controller/location.py",
"affordances/fuchsia_controller/netstack.py",
"affordances/fuchsia_controller/rtc.py",
"affordances/fuchsia_controller/tracing.py",
"affordances/fuchsia_controller/ui/__init__.py",
"affordances/fuchsia_controller/ui/user_input.py",
"affordances/power/__init__.py",
"affordances/power/system_power_state_controller/__init__.py",
"affordances/power/system_power_state_controller/system_power_state_controller.py",
"affordances/power/system_power_state_controller/system_power_state_controller_using_starnix.py",
"affordances/sl4f/__init__.py",
"affordances/sl4f/bluetooth/__init__.py",
"affordances/sl4f/bluetooth/bluetooth_common.py",
"affordances/sl4f/bluetooth/profiles/__init__.py",
"affordances/sl4f/bluetooth/profiles/bluetooth_avrcp.py",
"affordances/sl4f/bluetooth/profiles/bluetooth_gap.py",
"auxiliary_devices/__init__.py",
"auxiliary_devices/power_switch_dmc.py",
"errors.py",
"fuchsia_device/__init__.py",
"fuchsia_device/fuchsia_device.py",
"interfaces/__init__.py",
"interfaces/affordances/__init__.py",
"interfaces/affordances/bluetooth/bluetooth_common.py",
"interfaces/affordances/bluetooth/profiles/bluetooth_avrcp.py",
"interfaces/affordances/bluetooth/profiles/bluetooth_gap.py",
"interfaces/affordances/bluetooth/profiles/bluetooth_le.py",
"interfaces/affordances/inspect.py",
"interfaces/affordances/location.py",
"interfaces/affordances/netstack.py",
"interfaces/affordances/rtc.py",
"interfaces/affordances/session.py",
"interfaces/affordances/tracing.py",
"interfaces/affordances/ui/__init__.py",
"interfaces/affordances/ui/screenshot.py",
"interfaces/affordances/ui/user_input.py",
"interfaces/auxiliary_devices/__init__.py",
"interfaces/auxiliary_devices/power_switch.py",
"interfaces/device_classes/__init__.py",
"interfaces/device_classes/affordances_capable.py",
"interfaces/device_classes/fuchsia_device.py",
"interfaces/transports/__init__.py",
"interfaces/transports/fastboot.py",
"interfaces/transports/ffx.py",
"interfaces/transports/fuchsia_controller.py",
"interfaces/transports/serial.py",
"interfaces/transports/sl4f.py",
"transports/__init__.py",
"transports/fastboot.py",
"transports/ffx.py",
"transports/fuchsia_controller.py",
"transports/serial_using_unix_socket.py",
"transports/sl4f.py",
"typing/__init__.py",
"typing/bluetooth.py",
"typing/custom_types.py",
"typing/ffx.py",
"typing/netstack.py",
"typing/screenshot_image.py",
"typing/ui.py",
"utils/__init__.py",
"utils/common.py",
"utils/decorators.py",
"utils/host_shell.py",
"utils/http_utils.py",
"utils/properties.py",
]
library_deps = [
":honeydew_ffx_tool_deps",
":honeydew_fidl_ir_and_deps",
"//src/developer/ffx/lib/fuchsia-controller:fidl_bindings",
"//src/lib/diagnostics/python/fuchsia_inspect",
"//third_party/pypng",
]
data_package_name = "data"
data_sources = [ "${prebuilt_fastboot}" ]
# Ensure all FIDL dependencies are available and stable. Use the
# "partner_internal" SDK category and greater as an approximation of this.
# However, note that not everything in those categories is stable.
# TODO(https://fxbug.dev/314822328): Reframe the markers in terms of stability.
# Also, there are exceptions for host tests - see https://fxbug.dev/326090508.
assert_no_deps = [
"//sdk:marker-cts",
"//sdk:marker-excluded",
"//sdk:marker-experimental",
"//sdk:marker-internal",
"//sdk:marker-unknown",
]
}
# FIDL dependencies that will be used in Honeydew using Fuchsia-Controller.
group("honeydew_fidl_ir_and_deps") {
# Needed for SDK inclusion.
testonly = false
data_deps = [
# Required by Fuchsia Controller usage in Honeydew affordances and device classes.
"//sdk/fidl/fuchsia.bluetooth.gatt2:fuchsia.bluetooth.gatt2_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.io:fuchsia.io_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.location.namedplace:fuchsia.location.namedplace_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.net.root:fuchsia.net.root_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.wlan.device.service:fuchsia.wlan.device.service_host_test_data(${toolchain_variant.base})",
"//sdk/fidl/fuchsia.wlan.policy:fuchsia.wlan.policy_host_test_data(${toolchain_variant.base})",
# Required by Fuchsia Controller itself.
"//src/developer/ffx/lib/fuchsia-controller/tests:fuchsia_controller_test_data",
]
}
# FFX tools that will be used in Honeydew.
group("honeydew_ffx_tool_deps") {
# Needed for SDK inclusion.
testonly = false
deps = [
"//src/developer/ffx/plugins/inspect:ffx_inspect_tool_test_data",
"//src/developer/ffx/plugins/log:ffx_log_tool_test_data",
"//src/developer/ffx/plugins/test:ffx_test_tool_test_data",
"//src/developer/ffx/tools/starnix:ffx_starnix_test_data",
]
}
# SL4F packages
group("sl4f_packages") {
testonly = true
public_deps = [
"//src/sys/bin/start_sl4f",
"//src/testing/sl4f",
]
}
# Honeydew unit tests
# Command to run unit tests:
# fx set core.x64 --with-host //src/testing/end_to_end/honeydew:unit_tests
# fx test //src/testing/end_to_end/honeydew --host --output
group("unit_tests") {
testonly = true
public_deps = []
if (host_os != "mac") {
public_deps += [
"honeydew/affordances/connectivity/wlan/utils/tests/unit_tests:tests",
"honeydew/affordances/connectivity/wlan/wlan/tests/unit_tests:tests",
"honeydew/affordances/connectivity/wlan/wlan_policy/tests/unit_tests:tests",
"honeydew/affordances/connectivity/wlan/wlan_policy_ap/tests/unit_tests:tests",
"honeydew/affordances/power/system_power_state_controller/tests/unit_tests:tests",
"tests/unit_tests:tests",
]
}
}
# Honeydew functional tests
group("functional_tests") {
testonly = true
public_deps = []
if (host_os != "mac") {
public_deps += [
"honeydew/affordances/connectivity/wlan/wlan/tests/functional_tests:tests",
"honeydew/affordances/connectivity/wlan/wlan_policy/tests/functional_tests:tests",
"honeydew/affordances/connectivity/wlan/wlan_policy_ap/tests/functional_tests:tests",
"honeydew/affordances/power/system_power_state_controller/tests/functional_tests/test_system_power_state_controller:tests",
"tests/functional_tests:tests",
]
}
}