| # Copyright 2022 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("//build/rust/rustc_test.gni") |
| import("//build/testing/host_test.gni") |
| import("//src/developer/ffx/build/ffx_plugin.gni") |
| |
| ffx_plugin("ffx_storage_blackout_integration") { |
| version = "0.1.0" |
| edition = "2018" |
| |
| args_sources = [ "src/args.rs" ] |
| |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//tools/blackout/blackout-host", |
| "//tools/blackout/fidl/fuchsia.blackout.test:fuchsia.blackout.test-rustc", |
| ] |
| } |
| |
| rustc_binary("blackout-integration-target-bin") { |
| output_name = "blackout_integration_target_bin" |
| testonly = true |
| edition = "2018" |
| deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:log", |
| "//tools/blackout/blackout-target", |
| ] |
| source_root = "src/target.rs" |
| |
| sources = [ "src/target.rs" ] |
| } |
| |
| fuchsia_component("blackout-integration-target-component") { |
| testonly = true |
| deps = [ ":blackout-integration-target-bin" ] |
| manifest = "meta/blackout_integration_target.cml" |
| } |
| |
| fuchsia_package("blackout-integration-target") { |
| testonly = true |
| deps = [ ":blackout-integration-target-component" ] |
| } |
| |
| if (is_host) { |
| host_test("blackout-integration") { |
| binary_path = "$root_out_dir/ffx" |
| args = [ |
| "--config", |
| "storage_dev=true", |
| "storage", |
| "blackout", |
| "integration", |
| ] |
| |
| deps = [ "//src/developer/ffx:ffx_bin" ] |
| |
| environments = [ nuc_env ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":blackout-integration($host_toolchain)", |
| ":blackout-integration-target", |
| ] |
| } |