|
a |
|
b/third_party/nucleus/testing/BUILD |
|
|
1 |
# Testing utilities that are temporarily located here until they can |
|
|
2 |
# be separately open source. |
|
|
3 |
|
|
|
4 |
# Placeholder: load py_library |
|
|
5 |
# Placeholder: load py_test |
|
|
6 |
|
|
|
7 |
package( |
|
|
8 |
#default_applicable_licenses = ["//third_party/nucleus:license"], |
|
|
9 |
default_visibility = ["//visibility:public"], |
|
|
10 |
) |
|
|
11 |
|
|
|
12 |
licenses(["notice"]) |
|
|
13 |
|
|
|
14 |
test_suite( |
|
|
15 |
name = "smoke_tests", |
|
|
16 |
tests = [ |
|
|
17 |
"gunit_extras_test", |
|
|
18 |
], |
|
|
19 |
) |
|
|
20 |
|
|
|
21 |
cc_library( |
|
|
22 |
name = "testing_cpp", |
|
|
23 |
testonly = True, |
|
|
24 |
deps = [ |
|
|
25 |
":cpp_test_utils", |
|
|
26 |
":gunit_extras", |
|
|
27 |
], |
|
|
28 |
) |
|
|
29 |
|
|
|
30 |
py_library( |
|
|
31 |
name = "testing_py", |
|
|
32 |
testonly = True, |
|
|
33 |
deps = [ |
|
|
34 |
":py_test_utils", |
|
|
35 |
], |
|
|
36 |
) |
|
|
37 |
|
|
|
38 |
cc_library( |
|
|
39 |
name = "gunit_extras", |
|
|
40 |
testonly = True, |
|
|
41 |
srcs = [ |
|
|
42 |
"protocol-buffer-matchers.cc", |
|
|
43 |
], |
|
|
44 |
hdrs = [ |
|
|
45 |
"protocol-buffer-matchers.h", |
|
|
46 |
], |
|
|
47 |
deps = [ |
|
|
48 |
"//third_party/nucleus/platform:types", |
|
|
49 |
"@com_google_absl//absl/log", |
|
|
50 |
"@com_google_absl//absl/log:check", |
|
|
51 |
"@com_google_absl//absl/strings", |
|
|
52 |
"@com_google_protobuf//:protobuf", |
|
|
53 |
"@com_googlesource_code_re2//:re2", |
|
|
54 |
"@org_tensorflow//tensorflow/core:test", |
|
|
55 |
], |
|
|
56 |
) |
|
|
57 |
|
|
|
58 |
cc_test( |
|
|
59 |
name = "gunit_extras_test", |
|
|
60 |
size = "small", |
|
|
61 |
srcs = ["gunit_extras_test.cc"], |
|
|
62 |
deps = [ |
|
|
63 |
":gunit_extras", |
|
|
64 |
"//net/proto2/proto:empty_cc_pb2", |
|
|
65 |
"@com_google_googletest//:gtest_main", |
|
|
66 |
], |
|
|
67 |
) |
|
|
68 |
|
|
|
69 |
cc_library( |
|
|
70 |
name = "cpp_test_utils", |
|
|
71 |
testonly = True, |
|
|
72 |
srcs = ["test_utils.cc"], |
|
|
73 |
hdrs = ["test_utils.h"], |
|
|
74 |
deps = [ |
|
|
75 |
"//third_party/nucleus/core:statusor", |
|
|
76 |
"//third_party/nucleus/io:reader_base", |
|
|
77 |
"//third_party/nucleus/platform:types", |
|
|
78 |
"//third_party/nucleus/protos:cigar_cc_pb2", |
|
|
79 |
"//third_party/nucleus/protos:reads_cc_pb2", |
|
|
80 |
"//third_party/nucleus/protos:reference_cc_pb2", |
|
|
81 |
"//third_party/nucleus/util:cpp_utils", |
|
|
82 |
"@com_google_absl//absl/strings", |
|
|
83 |
"@org_tensorflow//tensorflow/core:lib", |
|
|
84 |
"@org_tensorflow//tensorflow/core:test", |
|
|
85 |
], |
|
|
86 |
) |
|
|
87 |
|
|
|
88 |
py_library( |
|
|
89 |
name = "py_test_utils", |
|
|
90 |
testonly = True, |
|
|
91 |
srcs = ["test_utils.py"], |
|
|
92 |
deps = [ |
|
|
93 |
"//third_party/nucleus/protos:position_py_pb2", |
|
|
94 |
"//third_party/nucleus/protos:reads_py_pb2", |
|
|
95 |
"//third_party/nucleus/protos:struct_py_pb2", |
|
|
96 |
"//third_party/nucleus/protos:variants_py_pb2", |
|
|
97 |
"//third_party/nucleus/util:cigar", |
|
|
98 |
"@absl_py//absl/flags", |
|
|
99 |
"@absl_py//absl/testing:absltest", |
|
|
100 |
], |
|
|
101 |
) |
|
|
102 |
|
|
|
103 |
py_test( |
|
|
104 |
name = "py_test_utils_test", |
|
|
105 |
size = "small", |
|
|
106 |
srcs = ["test_utils_test.py"], |
|
|
107 |
main = "test_utils_test.py", |
|
|
108 |
python_version = "PY3", |
|
|
109 |
srcs_version = "PY3", |
|
|
110 |
deps = [ |
|
|
111 |
":py_test_utils", |
|
|
112 |
"//third_party/nucleus/protos:cigar_py_pb2", |
|
|
113 |
"@absl_py//absl/testing:absltest", |
|
|
114 |
], |
|
|
115 |
) |
|
|
116 |
|
|
|
117 |
py_test( |
|
|
118 |
name = "protobuf_implementation_test", |
|
|
119 |
size = "small", |
|
|
120 |
srcs = ["protobuf_implementation_test.py"], |
|
|
121 |
python_version = "PY3", |
|
|
122 |
srcs_version = "PY3", |
|
|
123 |
deps = [ |
|
|
124 |
"//third_party/nucleus/io:sam", |
|
|
125 |
"@absl_py//absl/testing:absltest", |
|
|
126 |
"@com_google_protobuf//:protobuf_python", |
|
|
127 |
], |
|
|
128 |
) |