| # 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_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/lib/icu/tzdata/icu_tzdata_config_data.gni") |
| |
| rustc_library("icu_data") { |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:rust_icu_common", |
| "//third_party/rust_crates:rust_icu_sys", |
| "//third_party/rust_crates:rust_icu_ucal", |
| "//third_party/rust_crates:rust_icu_udata", |
| "//third_party/rust_crates:rust_icu_uenum", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:assert_matches" ] |
| |
| non_rust_deps = [ |
| "../../cpp:icu_data_cpp", |
| "//third_party/icu", |
| "//third_party/icu:icudata", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| icu_tzdata_config_data("icu_tzdata_for_icu_data_rust_tests") { |
| for_pkg = "icu_data_rust_tests" |
| } |
| |
| resource("icu_data_test_files") { |
| sources = [ "test_inconsistent_revision.txt" ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_unittest_package("icu_data_rust_tests") { |
| manifest = "meta/icu_data_lib_test.cmx" |
| deps = [ |
| ":icu_data_test", |
| ":icu_data_test_files", |
| ":icu_tzdata_for_icu_data_rust_tests", |
| "//src/intl:icudtl", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":icu_data_rust_tests" ] |
| } |