| # 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") |
| |
| # Library for working with Font Provider font manifests. |
| rustc_library("manifest") { |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/fidl_fuchsia_fonts_ext", |
| "//sdk/fidl/fuchsia.fonts:fuchsia.fonts-rustc", |
| "//src/fonts/char_set", |
| "//src/fonts/offset_string", |
| "//src/lib/error/clonable_error", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-url", |
| "//src/lib/intl/unicode_utils/char_collection", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:unic-char-range", |
| "//third_party/rust_crates:unicase", |
| ] |
| |
| test_deps = [ |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:pretty_assertions", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/serde_ext.rs", |
| "src/v1_to_v2.rs", |
| "src/v2.rs", |
| ] |
| } |
| |
| fuchsia_component("manifest_tests_cmp") { |
| testonly = true |
| manifest = "meta/manifest_lib_test.cmx" |
| component_name = "manifest_lib_test" |
| deps = [ ":manifest_test" ] |
| } |
| |
| fuchsia_test_package("manifest_tests") { |
| test_components = [ ":manifest_tests_cmp" ] |
| } |
| |
| # The host target is called `manifest_test`, but the binary's name is `manifest_lib_test`. |
| # |
| # fx run-host-tests manifest_lib_test # Host |
| # fx test manifest_tests # Fuchsia |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":manifest_test($host_toolchain)", |
| ":manifest_tests", |
| ] |
| } |