| # Copyright 2022 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/test.gni") |
| import("//src/lib/icu/third_party_icu_headers.gni") |
| import("//src/lib/intl/tz/zoneinfo_config_data.gni") |
| |
| group("tzdata") { |
| testonly = true |
| deps = [ ":tests" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":pkg" ] |
| } |
| |
| third_party_icu_headers("icu_headers") { |
| headers = [ |
| "third_party/icu/source/common/unicode/utypes.h", |
| "third_party/icu/source/i18n/unicode/timezone.h", |
| ] |
| } |
| |
| test("bin") { |
| output_name = "tzdata-test" |
| sources = [ "test.cc" ] |
| deps = [ |
| ":icu_headers", |
| "//src/lib/files", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/icu_data/cpp", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_test_component("component") { |
| manifest = "meta/tzdata-test.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("pkg") { |
| package_name = "tzdata-test" |
| test_components = [ ":component" ] |
| deps = [ |
| ":zoneinfo-for-tzdata-test", |
| "//src/intl:icudtl", |
| ] |
| } |
| |
| # TODO(fxbug.dev/109378): Migrate to directory capabilities |
| zoneinfo_config_data("zoneinfo-for-tzdata-test") { |
| for_pkg = "tzdata-test" |
| include_revision_file = true |
| } |