| # 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_library.gni") |
| |
| rustc_library("package-directory") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/pkg/lib/blobfs", |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:once_cell", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:static_assertions", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/sys/pkg/bin/pm:pm_bin", |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:proptest", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/meta_as_dir.rs", |
| "src/meta_as_file.rs", |
| "src/meta_file.rs", |
| "src/meta_subdir.rs", |
| "src/non_meta_subdir.rs", |
| "src/root_dir.rs", |
| ] |
| } |
| |
| fuchsia_component("test-component") { |
| component_name = "package-directory-lib-test" |
| visibility = [ ":*" ] |
| testonly = true |
| deps = [ ":package-directory_test" ] |
| manifest = "meta/package-directory-lib-test.cml" |
| } |
| |
| fuchsia_test_package("package-directory-tests") { |
| test_components = [ ":test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":package-directory-tests" ] |
| } |