blob: 19a97b11536f6e8e152fde02a280193879070452 [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/zircon/zx_library.gni")
group("tests") {
testonly = true
deps = [ "test:fake-ddk-test" ]
}
zx_library("fake_ddk") {
sdk = "source"
sdk_headers = [ "lib/fake_ddk/fake_ddk.h" ]
testonly = true
configs += [ "//build/config:all_source" ]
sources = [
"fake_ddk.cc",
"fidl-helper.cc",
]
deps = [
"//sdk/lib/fdio",
"//sdk/lib/fidl/llcpp",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fidl-async",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zx",
]
public_deps = [
# <lib/fake_ddk/fidl-helper.h> has #include <lib/async-loop/cpp/loop.h>.
"//zircon/system/ulib/async-loop",
# <lib/fake_ddk/fake_ddk.h> has #include <ddk/device.h>.
"//src/lib/ddk",
# <lib/fake_ddk/fidl-helper.h> has #include <ddktl/fidl.h>.
"//src/lib/ddktl",
# <lib/fake_ddk/fake_ddk.h> has #include <fbl/array.h>
"//zircon/system/ulib/fbl",
# <lib/fake_ddk/fidl-helper.h> has #include <lib/fidl/llcpp/server.h>.
"//sdk/lib/fidl/llcpp",
# <lib/fake_ddk/fake_ddk.h> has #include <lib/sync/completion.h>.
"//zircon/system/ulib/sync",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
# This is an allowlist of targets that use the fake ddk test framework.
# There is a migration in progress to mock-ddk. See:
# https://fuchsia.dev/fuchsia-src/contribute/open_projects/testing/mock_ddk_migration
#
# The policy at this time is:
# 1. Pre-existing use of fake_ddk is allowlisted.
# 2. New usage of fake_ddk is discouraged.
# Please see the self-service migration guide.
#
# To remove items from the allowlist, please send a change to one of the OWNERS of
# this file to remove an element from the visibility list below.
# Please allowlist entire directories rather than individual targets as it
# requires less allowlist churn over time.
#
# To regenerate:
# scripts/gn/trim_visibility.py --target="//src/devices/testing/fake_ddk"
visibility = [
"//build/*",
"//build/cpp/*",
"//src/camera/drivers/controller/test/*",
"//src/connectivity/ethernet/drivers/ethernet/*",
"//src/connectivity/ethernet/drivers/rndis-function/*",
"//src/connectivity/ethernet/drivers/virtio/*",
"//src/devices/block/drivers/aml-sdmmc/*",
"//src/devices/block/drivers/sdhci/*",
"//src/devices/block/drivers/usb-mass-storage/*",
"//src/devices/block/drivers/virtio/*",
"//src/devices/board/drivers/x86/*",
"//src/devices/bus/drivers/pci/test/*",
"//src/devices/bus/lib/virtio/*",
"//src/devices/bus/testing/fake-pdev/*",
"//src/devices/cpu/bin/cpuctl/*",
"//src/devices/cpu/drivers/aml-cpu-legacy/*",
"//src/devices/cpu/drivers/aml-cpu/*",
"//src/devices/gpio/drivers/gpio/*",
"//src/devices/lib/goldfish/pipe_io/*",
"//src/devices/nand/drivers/aml-rawnand/tests/*",
"//src/devices/nand/drivers/nand/tests/*",
"//src/devices/nand/drivers/ram-nand/*",
"//src/devices/nand/drivers/skip-block/*",
"//src/devices/power/drivers/ti-ina231/*",
"//src/devices/ram/drivers/aml-ram/*",
"//src/devices/securemem/drivers/aml-securemem/*",
"//src/devices/serial/drivers/ftdi/test/*",
"//src/devices/serial/drivers/serial-async/tests/*",
"//src/devices/spi/drivers/aml-spi/*",
"//src/devices/sysmem/tests/sysmem/fuzz/*",
"//src/devices/temperature/drivers/tmp112/*",
"//src/devices/testing/*",
"//src/devices/testing/fake_ddk/test/*",
"//src/devices/thermal/drivers/aml-thermistor/test/*",
"//src/devices/usb/drivers/aml-usb-phy-v2/*",
"//src/devices/usb/drivers/usb-bus/*",
"//src/devices/usb/drivers/usb-hub/*",
"//src/devices/usb/drivers/usb-peripheral/*",
"//src/devices/usb/drivers/usb-virtual-bus/*",
"//src/devices/usb/drivers/xhci/*",
"//src/graphics/display/drivers/aml-hdmi/*",
"//src/graphics/display/drivers/display/tests/*",
"//src/graphics/display/drivers/fake/*",
"//src/graphics/display/lib/designware/test/*",
"//src/graphics/lib/magma/tests/unit_tests/*",
"//src/media/audio/drivers/aml-g12-pdm/test/*",
"//src/media/audio/drivers/intel-hda/controller/*",
"//src/media/audio/drivers/usb-audio/tests/*",
"//src/media/audio/lib/simple-audio-stream/tests/*",
"//src/media/drivers/amlogic_decoder/tests/unit_tests/*",
"//src/ui/input/drivers/hid-buttons/*",
"//src/ui/input/drivers/hid-input-report/*",
"//src/ui/input/drivers/hidctl/*",
"//src/ui/input/drivers/i2c-hid/*",
]
# At this time we are not enforcing restrictions on the below.
visibility += [
"//third_party/*",
"//vendor/*",
]
}