| # 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/rust/rustc_library.gni") |
| |
| rustc_library("pkgfs") { |
| name = "pkgfs" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fuchsia-component", |
| "//src/lib/storage/ramdevice_client", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//src/sys/pkg/testing/blobfs-ramdisk", |
| "//src/sys/pkg/testing/pkgfs-ramdisk", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures-util", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ |
| "src/control.rs", |
| "src/install.rs", |
| "src/lib.rs", |
| "src/needs.rs", |
| "src/packages.rs", |
| "src/system.rs", |
| "src/versions.rs", |
| ] |
| } |
| |
| fuchsia_unittest_component("pkgfs-lib-test") { |
| manifest = "meta/pkgfs-lib-test.cmx" |
| deps = [ ":pkgfs_test" ] |
| } |
| |
| fuchsia_test_package("pkgfs-tests") { |
| test_components = [ ":pkgfs-lib-test" ] |
| |
| # [blobfs] ERROR: [src/storage/blobfs/blob.cc(419)] downloaded blob did not match provided digest 71922c2ce9b17ea08ff139e3c699ea04558caf955ea56924f69b6daf4c3ce852 |
| # [block,driver_host:misc,driver] ERROR: [src/devices/block/drivers/core/manager.cc(103)] block: Joining un-closed FIFO server |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| "//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr-component", |
| "//src/storage/bin/blobfs", |
| "//src/sys/pkg/bin/pkgfs:pkgsvr", |
| "//src/sys/pkg/bin/pm:pm_bin", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":pkgfs-tests" ] |
| } |