| # 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/cipd.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/package.gni") |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":usb-hci-test-driver", |
| ":usb-hci-test-package", |
| ] |
| } |
| |
| test_package("usb-hci-test-package") { |
| deps = [ ":usb-hci-test" ] |
| |
| tests = [ |
| { |
| name = "usb-hci-test" |
| environments = [ |
| { |
| dimensions = { |
| device_type = "Intel NUC Kit NUC7i5DNHE" |
| } |
| tags = [ "usb-compliance-tests" ] |
| }, |
| ] |
| }, |
| ] |
| } |
| |
| # Each e2e test must run in its own executable. |
| test("usb-hci-test") { |
| sources = [ "main.cc" ] |
| output_name = "usb-hci-test" |
| defines = [ |
| "EXPECTED_BITRATE=1", |
| "EXPECTED_ISOCH_PACKETS=119000", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.usb.hcitest", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fxl", |
| "//src/lib/ui/base_view", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| driver_module("driver") { |
| output_name = "usb-hci-test-driver" |
| |
| sources = [ "usb-hci-test-driver.cc" ] |
| |
| deps = [ |
| "//sdk/banjo/ddk.protocol.usb", |
| "//sdk/banjo/ddk.protocol.usb.request", |
| "//sdk/fidl/fuchsia.hardware.usb.hcitest:fuchsia.hardware.usb.hcitest_llcpp", |
| "//src/devices/lib/driver", |
| "//src/devices/usb/lib/usb", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } |
| |
| package("usb-hci-test-driver") { |
| deprecated_system_image = true |
| |
| deps = [ ":driver" ] |
| |
| drivers = [ |
| { |
| name = "usb-hci-test-driver.so" |
| }, |
| ] |
| } |