xref: /aosp_15_r20/external/federated-compute/fcp/tracing/test/BUILD (revision 14675a029014e728ec732f129a32e299b2da0601)
1*14675a02SAndroid Build Coastguard Worker# Copyright 2019 Google LLC
2*14675a02SAndroid Build Coastguard Worker#
3*14675a02SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
4*14675a02SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
5*14675a02SAndroid Build Coastguard Worker# You may obtain a copy of the License at
6*14675a02SAndroid Build Coastguard Worker#
7*14675a02SAndroid Build Coastguard Worker#      http://www.apache.org/licenses/LICENSE-2.0
8*14675a02SAndroid Build Coastguard Worker#
9*14675a02SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*14675a02SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
11*14675a02SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*14675a02SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
13*14675a02SAndroid Build Coastguard Worker# limitations under the License.
14*14675a02SAndroid Build Coastguard Worker
15*14675a02SAndroid Build Coastguard Workerload("//fcp:config.bzl", "FCP_COPTS")
16*14675a02SAndroid Build Coastguard Workerload("//fcp/tracing:build_defs.bzl", "tracing_schema_cc_library")
17*14675a02SAndroid Build Coastguard Worker
18*14675a02SAndroid Build Coastguard Workerpackage(
19*14675a02SAndroid Build Coastguard Worker    default_visibility = ["//fcp:internal"],
20*14675a02SAndroid Build Coastguard Worker    licenses = ["notice"],  # Apache 2.0
21*14675a02SAndroid Build Coastguard Worker)
22*14675a02SAndroid Build Coastguard Worker
23*14675a02SAndroid Build Coastguard Workertracing_schema_cc_library(
24*14675a02SAndroid Build Coastguard Worker    name = "tracing_schema",
25*14675a02SAndroid Build Coastguard Worker    srcs = ["tracing_schema.fbs"],
26*14675a02SAndroid Build Coastguard Worker)
27*14675a02SAndroid Build Coastguard Worker
28*14675a02SAndroid Build Coastguard Workercc_test(
29*14675a02SAndroid Build Coastguard Worker    name = "tracing_test",
30*14675a02SAndroid Build Coastguard Worker    srcs = [
31*14675a02SAndroid Build Coastguard Worker        "tracing_test.cc",
32*14675a02SAndroid Build Coastguard Worker    ],
33*14675a02SAndroid Build Coastguard Worker    copts = FCP_COPTS,
34*14675a02SAndroid Build Coastguard Worker    deps = [
35*14675a02SAndroid Build Coastguard Worker        ":tracing_schema",
36*14675a02SAndroid Build Coastguard Worker        "//fcp/tracing:test_tracing_recorder",
37*14675a02SAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
38*14675a02SAndroid Build Coastguard Worker        "@flatbuffers",
39*14675a02SAndroid Build Coastguard Worker    ],
40*14675a02SAndroid Build Coastguard Worker)
41*14675a02SAndroid Build Coastguard Worker
42*14675a02SAndroid Build Coastguard Workercc_test(
43*14675a02SAndroid Build Coastguard Worker    name = "text_tracing_test",
44*14675a02SAndroid Build Coastguard Worker    srcs = ["text_tracing_test.cc"],
45*14675a02SAndroid Build Coastguard Worker    copts = FCP_COPTS,
46*14675a02SAndroid Build Coastguard Worker    data = glob([
47*14675a02SAndroid Build Coastguard Worker        "testdata/*.baseline",
48*14675a02SAndroid Build Coastguard Worker    ]),
49*14675a02SAndroid Build Coastguard Worker    deps = [
50*14675a02SAndroid Build Coastguard Worker        ":tracing_schema",
51*14675a02SAndroid Build Coastguard Worker        "//fcp/base",
52*14675a02SAndroid Build Coastguard Worker        "//fcp/testing",
53*14675a02SAndroid Build Coastguard Worker        "//fcp/tracing",
54*14675a02SAndroid Build Coastguard Worker        "@com_google_absl//absl/strings",
55*14675a02SAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
56*14675a02SAndroid Build Coastguard Worker        "@com_googlesource_code_re2//:re2",
57*14675a02SAndroid Build Coastguard Worker    ],
58*14675a02SAndroid Build Coastguard Worker)
59*14675a02SAndroid Build Coastguard Worker
60*14675a02SAndroid Build Coastguard Workercc_test(
61*14675a02SAndroid Build Coastguard Worker    name = "tracing_context_utils_test",
62*14675a02SAndroid Build Coastguard Worker    srcs = ["tracing_context_utils_test.cc"],
63*14675a02SAndroid Build Coastguard Worker    copts = FCP_COPTS,
64*14675a02SAndroid Build Coastguard Worker    deps = [
65*14675a02SAndroid Build Coastguard Worker        ":test_api_message_cc_proto",
66*14675a02SAndroid Build Coastguard Worker        "//fcp/tracing:tracing_context_utils",
67*14675a02SAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
68*14675a02SAndroid Build Coastguard Worker    ],
69*14675a02SAndroid Build Coastguard Worker)
70*14675a02SAndroid Build Coastguard Worker
71*14675a02SAndroid Build Coastguard Workercc_test(
72*14675a02SAndroid Build Coastguard Worker    name = "thread_local_tracing_recorder_test",
73*14675a02SAndroid Build Coastguard Worker    srcs = ["thread_local_tracing_recorder_test.cc"],
74*14675a02SAndroid Build Coastguard Worker    copts = FCP_COPTS,
75*14675a02SAndroid Build Coastguard Worker    data = glob([
76*14675a02SAndroid Build Coastguard Worker        "testdata/*.baseline",
77*14675a02SAndroid Build Coastguard Worker    ]),
78*14675a02SAndroid Build Coastguard Worker    deps = [
79*14675a02SAndroid Build Coastguard Worker        ":tracing_schema",
80*14675a02SAndroid Build Coastguard Worker        "//fcp/base",
81*14675a02SAndroid Build Coastguard Worker        "//fcp/base:scheduler",
82*14675a02SAndroid Build Coastguard Worker        "//fcp/testing",
83*14675a02SAndroid Build Coastguard Worker        "//fcp/tracing",
84*14675a02SAndroid Build Coastguard Worker        "@com_google_absl//absl/strings",
85*14675a02SAndroid Build Coastguard Worker        "@com_google_absl//absl/time",
86*14675a02SAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
87*14675a02SAndroid Build Coastguard Worker        "@com_googlesource_code_re2//:re2",
88*14675a02SAndroid Build Coastguard Worker    ],
89*14675a02SAndroid Build Coastguard Worker)
90*14675a02SAndroid Build Coastguard Worker
91*14675a02SAndroid Build Coastguard Workerproto_library(
92*14675a02SAndroid Build Coastguard Worker    name = "test_api_message_proto",
93*14675a02SAndroid Build Coastguard Worker    srcs = ["test_api_message.proto"],
94*14675a02SAndroid Build Coastguard Worker)
95*14675a02SAndroid Build Coastguard Worker
96*14675a02SAndroid Build Coastguard Workercc_proto_library(
97*14675a02SAndroid Build Coastguard Worker    name = "test_api_message_cc_proto",
98*14675a02SAndroid Build Coastguard Worker    deps = [":test_api_message_proto"],
99*14675a02SAndroid Build Coastguard Worker)
100