| # Copyright 2023 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/host.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//src/developer/ffx/lib/e2e_emu/ffx_e2e_test.gni") |
| |
| if (is_host) { |
| group("host_tests") { |
| testonly = true |
| if (has_board) { |
| deps = [ ":verify_ffx_target_package_explore" ] |
| } |
| } |
| if (has_board) { |
| ffx_e2e_test("verify_ffx_target_package_explore") { |
| testonly = true |
| edition = "2024" |
| source_root = "src/main.rs" |
| sources = [ source_root ] |
| deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:log", |
| ] |
| inputs = [ |
| "testdata/package_file.txt", |
| "testdata/subpackage_file.txt", |
| "testdata/subsubpackage_file.txt", |
| ] |
| } |
| } |
| } |
| |
| if (is_fuchsia) { |
| group("package_deps_for_host_tests") { |
| testonly = true |
| deps = [ ":verify_ffx_target_package_explore_superpackage" ] |
| } |
| |
| fuchsia_package("verify_ffx_target_package_explore_superpackage") { |
| testonly = true |
| deps = [ ":package-file" ] |
| subpackages = [ ":verify_ffx_target_package_explore_subpackage" ] |
| } |
| |
| resource("package-file") { |
| testonly = true |
| sources = [ "testdata/package_file.txt" ] |
| outputs = [ "data/package_file.txt" ] |
| } |
| |
| fuchsia_package("verify_ffx_target_package_explore_subpackage") { |
| testonly = true |
| deps = [ ":subpackage-file" ] |
| subpackages = [ ":verify_ffx_target_package_explore_subsubpackage" ] |
| } |
| |
| resource("subpackage-file") { |
| testonly = true |
| sources = [ "testdata/subpackage_file.txt" ] |
| outputs = [ "data/subpackage_file.txt" ] |
| } |
| |
| fuchsia_package("verify_ffx_target_package_explore_subsubpackage") { |
| testonly = true |
| deps = [ ":subsubpackage-file" ] |
| } |
| |
| resource("subsubpackage-file") { |
| testonly = true |
| sources = [ "testdata/subsubpackage_file.txt" ] |
| outputs = [ "data/subsubpackage_file.txt" ] |
| } |
| } |