| # 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/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_library("fuchsia-pkg") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:proptest-derive", |
| ] |
| |
| sources = [ |
| "src/build.rs", |
| "src/creation_manifest.rs", |
| "src/errors.rs", |
| "src/lib.rs", |
| "src/meta_contents.rs", |
| "src/meta_package.rs", |
| "src/package_manifest.rs", |
| "src/path.rs", |
| "src/test.rs", |
| ] |
| } |
| |
| fuchsia_component("test-component") { |
| component_name = "fuchsia-pkg-lib-test" |
| visibility = [ ":*" ] |
| testonly = true |
| deps = [ ":fuchsia-pkg_test" ] |
| manifest = "meta/fuchsia-pkg-tests.cml" |
| } |
| |
| fuchsia_test_package("fuchsia-pkg-tests") { |
| test_components = [ ":test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":fuchsia-pkg-tests" ] |
| } |