blob: 4f5bb8ebc7555cdb2b0c6fa02308590b9bb8a862 [file] [log] [blame]
# 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.
# This file was generated by the `fx create` command. The template
# is located at `//tools/create/templates/component-v1/BUILD.gn.tmpl-rust`.
# If you find something broken, we are eager to review fixes.
import("//build/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
group("usb-updater") {
testonly = true
deps = [
":package",
":tests",
]
}
group("tests") {
testonly = true
deps = [ ":usb-updater-unittests" ]
}
rustc_binary("bin") {
name = "usb-updater"
# Generates a GN target for unit-tests with the label `bin_test`, and
# a binary named `usb_updater_bin_test`.
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.update.usb:fuchsia.update.usb-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-url",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("component") {
component_name = "usb-updater"
manifest = "meta/usb-updater.cmx"
deps = [ ":bin" ]
}
fuchsia_package("package") {
package_name = "usb-updater"
deps = [ ":component" ]
}
# Run with `fx test usb-updater-unittests`.
fuchsia_unittest_package("usb-updater-unittests") {
#executable_path = "bin/usb_updater_bin_test"
deps = [ ":bin_test" ]
}