-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathBUILD.bazel
58 lines (53 loc) · 1.55 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "duration",
srcs = [
"duration.go",
"parse.go",
],
embed = [":duration_go_proto"],
importpath = "github.com/cockroachdb/cockroach/pkg/util/duration",
visibility = ["//visibility:public"],
deps = [
"//pkg/sql/pgwire/pgcode",
"//pkg/sql/pgwire/pgerror",
"//pkg/sql/types",
"//pkg/util/arith",
"@com_github_cockroachdb_apd_v3//:apd",
"@com_github_cockroachdb_errors//:errors",
],
)
go_test(
name = "duration_test",
size = "small",
srcs = [
"duration_test.go",
"parse_test.go",
],
args = ["-test.timeout=55s"],
embed = [":duration"],
deps = [
"//pkg/sql/types",
"//pkg/util/leaktest",
"//pkg/util/log",
"//pkg/util/timeutil",
"@com_github_stretchr_testify//require",
],
)
proto_library(
name = "duration_proto",
srcs = ["duration.proto"],
strip_import_prefix = "/pkg",
visibility = ["//visibility:public"],
)
go_proto_library(
name = "duration_go_proto",
compilers = ["//pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_compiler"],
importpath = "github.com/cockroachdb/cockroach/pkg/util/duration",
proto = ":duration_proto",
visibility = ["//visibility:public"],
)
get_x_data(name = "get_x_data")