| # 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. |
| |
| import("//build/components.gni") |
| import("//build/dist/renamed_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("driver") { |
| name = "pkgctl_integration_test" |
| edition = "2021" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.net.http:fuchsia.net.http_rust", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite_rust", |
| "//sdk/fidl/fuchsia.space:fuchsia.space_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-sync", |
| "//src/lib/fuchsia-url", |
| "//src/lib/testing/fuchsia-hyper-test-support", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext", |
| "//src/sys/pkg/testing/shell-process", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_test_component("pkgctl_integration_test-component") { |
| component_name = "pkgctl-integration-test" |
| manifest = "meta/pkgctl-integration-test.cml" |
| deps = [ ":driver" ] |
| test_type = "system" |
| } |
| |
| renamed_binary("pkgctl-binary") { |
| dest = "bin/pkgctl" |
| source = "$root_out_dir/multi_universal_tool" |
| source_deps = [ "//src/sys/pkg/bin/multi-universal-tool" ] |
| } |
| |
| fuchsia_test_package("pkgctl-integration-tests") { |
| test_components = [ ":pkgctl_integration_test-component" ] |
| deps = [ |
| ":pkgctl-binary", |
| "//src/connectivity/network:netstack-for-tests", |
| "//src/connectivity/network/dns:component", |
| "//src/connectivity/policy/http-client:component", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":pkgctl-integration-tests" ] |
| } |