| # Copyright 2021 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/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//src/storage/testing/driver_test_realm.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":live-usb-unittests" ] |
| } |
| |
| fuchsia_package("package") { |
| package_name = "live-usb" |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "live-usb" |
| manifest = "meta/live-usb.cml" |
| deps = [ ":bin" ] |
| } |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| output_name = "live_usb" |
| |
| with_unit_tests = true |
| |
| configs += [ "//build/config/rust:bootfs" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_rust", |
| "//sdk/fidl/fuchsia.fshost:fuchsia.fshost_rust", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_rust", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/lib/block_client/rust:remote-block-device", |
| "//src/storage/lib/ramdevice_client", |
| "//src/sys/lib/payload_streamer", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:gpt", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia-url", |
| "//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext", |
| ] |
| |
| sources = [ |
| "src/block_wrapper.rs", |
| "src/fvm.rs", |
| "src/gpt.rs", |
| "src/main.rs", |
| "src/pkg.rs", |
| ] |
| } |
| |
| storage_driver_test_realm_v2_component("live-usb-test") { |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("live-usb-unittests") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":live-usb-test" ] |
| } |