1# Copyright 2019 Google LLC 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("//fcp:config.bzl", "FCP_COPTS") 16 17package( 18 default_visibility = ["//fcp:internal"], 19 licenses = ["notice"], # Apache 2.0 20) 21 22cc_binary( 23 name = "tracing_traits_generator", 24 srcs = ["tracing_traits_generator.cc"], 25 deps = [ 26 "//fcp/tracing:tracing_severity", 27 "@com_google_absl//absl/container:flat_hash_map", 28 "@com_google_absl//absl/container:flat_hash_set", 29 "@com_google_absl//absl/strings", 30 "@com_google_absl//absl/strings:str_format", 31 "@flatbuffers", 32 ], 33) 34 35cc_test( 36 name = "tracing_traits_generator_test", 37 srcs = ["tracing_traits_generator_test.cc"], 38 args = ["--codegen_tool_path=$(location :test_codegen_runner.sh)"], 39 copts = FCP_COPTS, 40 data = glob([ 41 "testdata/*.baseline", 42 "testdata/*.fbs", 43 ]) + [ 44 ":test_codegen_runner.sh", 45 ":tracing_traits_generator", 46 "//fcp/tracing:tracing_schema_common.fbs", 47 "@flatbuffers//:flatc", 48 ], 49 deps = [ 50 "//fcp/base", 51 "//fcp/testing", 52 "@com_google_absl//absl/flags:flag", 53 "@com_google_absl//absl/strings", 54 "@com_google_googletest//:gtest_main", 55 ], 56) 57