| # 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/fuchsia_unittest_package.gni") |
| |
| executable("aml-g12-tdm-test-bin") { |
| configs += [ "//build/config:all_source" ] |
| testonly = true |
| sources = [ |
| "../aml-tdm-config-device.cc", |
| "../audio-stream.cc", |
| "stream-test.cc", |
| ] |
| deps = [ |
| "../:aml-g12-tdm-bind", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp_mock", |
| "//sdk/banjo/fuchsia.hardware.i2c", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_llcpp", |
| "//sdk/lib/inspect/testing/cpp:zxtest", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/testing/fake-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/i2c/testing/mock-i2c", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/mmio", |
| "//src/devices/testing/fake-mmio-reg", |
| "//src/devices/testing/fake_ddk", |
| "//src/devices/testing/mock-mmio-reg", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/media/audio/lib/simple-audio-stream", |
| "//src/media/audio/lib/simple-codec", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/audio-driver-proto", |
| "//zircon/system/ulib/audio-proto-utils", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/inspect", |
| ] |
| } |
| |
| executable("aml-g12-tdm-dai-test-bin") { |
| configs += [ "//build/config:all_source" ] |
| testonly = true |
| sources = [ |
| "../aml-tdm-config-device.cc", |
| "../dai.cc", |
| "dai-test.cc", |
| ] |
| deps = [ |
| "../:aml-g12-tdm-dai-bind", |
| "//sdk/banjo/fuchsia.hardware.audio", |
| "//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.audio", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_llcpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/testing/fake-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/mmio", |
| "//src/devices/testing/fake-mmio-reg", |
| "//src/devices/testing/fake_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fzl", |
| |
| # TODO(andresoportus): Remove depedency on TLS (maybe done by C++ bindings unification). |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_unittest_package("stream-test-package") { |
| package_name = "aml-g12-tdm-test" |
| deps = [ ":aml-g12-tdm-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| fuchsia_unittest_package("dai-test-package") { |
| package_name = "aml-g12-tdm-dai-test" |
| deps = [ ":aml-g12-tdm-dai-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |