| # 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_test.gni") |
| import("//sdk/ctf/build/ctf.gni") |
| |
| rustc_test("driver") { |
| name = "pkgdir_integration_test" |
| edition = "2024" |
| |
| deps = [ |
| "test_realm_proxy/fidl:fuchsia.pkg.test_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:pretty_assertions", |
| ] |
| |
| sources = [ |
| "src/directory.rs", |
| "src/file.rs", |
| "src/lib.rs", |
| "src/node.rs", |
| ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_component("pkgdir-tests-component") { |
| component_name = "default" |
| testonly = true |
| manifest = "meta/pkgdir-integration-test.cml" |
| deps = [ ":driver" ] |
| } |
| |
| ctf_fuchsia_package("pkgdir-tests") { |
| package_name = "pkgdir-tests" |
| testonly = true |
| deps = [ ":pkgdir-tests-component" ] |
| } |
| |
| fuchsia_component("test-root") { |
| testonly = true |
| manifest = "meta/test-root.cml" |
| deps = [ "//src/storage/testing:storage_driver_test_realm" ] |
| } |
| |
| fuchsia_test_package("pkgdir-integration-tests") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":test-root" ] |
| subpackages = [ |
| "test_realm_proxy", |
| ":pkgdir-tests", |
| ] |
| } |
| |
| fuchsia_test_package("pkgdir-integration-tests-fxblob") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":test-root" ] |
| subpackages = [ ":pkgdir-tests" ] |
| renameable_subpackages = [ |
| { |
| name = "test_realm_proxy" |
| package = |
| "//src/sys/pkg/tests/pkgdir/test_realm_proxy:test_realm_proxy_fxblob" |
| }, |
| ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| ":pkgdir-integration-tests", |
| ":pkgdir-integration-tests-fxblob", |
| ] |
| } |
| |
| group("ctf-tests") { |
| testonly = true |
| deps = [ ":pkgdir-tests_archive" ] |
| } |