blob: 0876cb95b018ab3902c37faea451304165d77bb1 [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.
driver("usb-mass-storage") {
sources = [
"usb-mass-storage.cc",
]
deps = [
":block",
]
# TODO(ZX-2863): This driver violates the allowed shlib deps policy.
deprecated_inhibit_driver_shlib_allowlist = true
}
source_set("block") {
visibility = [ ":*" ]
sources = [
"block.cc",
]
public_deps = [
"$zx/system/banjo/ddk.protocol.block",
"$zx/system/banjo/ddk.protocol.usb",
"$zx/system/banjo/ddk.protocol.usb.composite",
"$zx/system/banjo/ddk.protocol.usb.request",
"$zx/system/dev/lib/usb",
"$zx/system/ulib/async-loop",
"$zx/system/ulib/ddk",
"$zx/system/ulib/ddktl",
"$zx/system/ulib/fbl",
"$zx/system/ulib/fidl-async",
"$zx/system/ulib/ftl",
"$zx/system/ulib/fzl",
"$zx/system/ulib/sync",
"$zx/system/ulib/zircon",
"$zx/system/ulib/zx",
]
}
group("tests") {
testonly = true
deps = [
":ums",
":ums-block",
]
}
test("ums-block") {
sources = [
"tests/block.cc",
]
deps = [
":block",
"$zx/system/dev/lib/fake-bti",
"$zx/system/dev/lib/fake_ddk",
"$zx/system/ulib/driver",
"$zx/system/ulib/fdio",
"$zx/system/ulib/fit",
"$zx/system/ulib/unittest",
]
}
test("ums") {
sources = [
"tests/usb-mass-storage.cc",
"usb-mass-storage.cc",
]
defines = [ "UNITTEST" ]
deps = [
":block",
"$zx/system/dev/lib/fake-bti",
"$zx/system/dev/lib/fake_ddk",
"$zx/system/ulib/driver",
"$zx/system/ulib/fdio",
"$zx/system/ulib/fit",
"$zx/system/ulib/unittest",
]
}