diff options
author | Abseil Team <absl-team@google.com> | 2022-11-14 08:27:52 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-11-14 08:28:36 -0800 |
commit | 4b65075a739f557782ef11e04f306212a21c0394 (patch) | |
tree | 6841599c5db0654e55b26f3193d9d6fc5599023f /absl/time/internal | |
parent | 1b976982d8cdbfd8320f34209b065bae7adefb09 (diff) |
Run the //absl/time timezone tests with a data dependency on, and a
matching ${TZDIR} setting for, //absl/time/internal/cctz:zoneinfo.
This eliminates any hidden dependency on /usr/share/zoneinfo, and
enables the upcoming deletion of the embedded internal/zoneinfo.inc
data from //absl/time:test_util.
PiperOrigin-RevId: 488372848
Change-Id: If1c8525b5ca4348cb2fc3b4760819f791b6e9725
Diffstat (limited to 'absl/time/internal')
-rw-r--r-- | absl/time/internal/cctz/BUILD.bazel | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel index 047e889a..edeabd81 100644 --- a/absl/time/internal/cctz/BUILD.bazel +++ b/absl/time/internal/cctz/BUILD.bazel @@ -16,11 +16,6 @@ package(features = ["-parse_headers"]) licenses(["notice"]) -filegroup( - name = "zoneinfo", - srcs = glob(["testdata/zoneinfo/**"]), -) - ### libraries cc_library( @@ -96,6 +91,7 @@ cc_test( size = "small", srcs = ["src/time_zone_format_test.cc"], data = [":zoneinfo"], + env = {"TZDIR": "absl/time/internal/cctz/testdata/zoneinfo"}, tags = [ "no_test_android_arm", "no_test_android_arm64", @@ -116,6 +112,7 @@ cc_test( timeout = "moderate", srcs = ["src/time_zone_lookup_test.cc"], data = [":zoneinfo"], + env = {"TZDIR": "absl/time/internal/cctz/testdata/zoneinfo"}, tags = [ "no_test_android_arm", "no_test_android_arm64", @@ -151,6 +148,12 @@ cc_test( ], ) +filegroup( + name = "zoneinfo", + srcs = glob(["testdata/zoneinfo/**"]), + visibility = ["//absl/time:__subpackages__"], +) + ### examples ### binaries |