1# Copyright 2018 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 15package(default_visibility = ["//visibility:public"]) 16 17licenses(["notice"]) # Apache 2.0 18 19load(":bigtable_benchmark_common.bzl", "bigtable_benchmark_common_hdrs", "bigtable_benchmark_common_srcs") 20 21cc_library( 22 name = "bigtable_benchmark_common", 23 srcs = bigtable_benchmark_common_srcs, 24 hdrs = bigtable_benchmark_common_hdrs, 25 deps = [ 26 "//google/cloud:google_cloud_cpp_common", 27 "//google/cloud/bigtable:bigtable_client", 28 ], 29) 30 31load(":bigtable_benchmark_programs.bzl", "bigtable_benchmark_programs") 32 33[cc_test( 34 name = test.replace("/", "_").replace(".cc", ""), 35 srcs = [test], 36 linkopts = select({ 37 "@bazel_tools//src/conditions:windows": [], 38 "//conditions:default": ["-lpthread"], 39 }), 40 tags = [ 41 "integration-test", 42 ], 43 deps = [ 44 ":bigtable_benchmark_common", 45 "//google/cloud:google_cloud_cpp_common", 46 "//google/cloud/bigtable:bigtable_client", 47 ], 48) for test in bigtable_benchmark_programs] 49 50load(":bigtable_benchmarks_unit_tests.bzl", "bigtable_benchmarks_unit_tests") 51 52[cc_test( 53 name = test.replace("/", "_").replace(".cc", ""), 54 srcs = [test], 55 linkopts = select({ 56 "@bazel_tools//src/conditions:windows": [], 57 "//conditions:default": ["-lpthread"], 58 }), 59 deps = [ 60 ":bigtable_benchmark_common", 61 "//google/cloud:google_cloud_cpp_common", 62 "//google/cloud/bigtable:bigtable_client", 63 "//google/cloud/testing_util:google_cloud_cpp_testing", 64 "@com_google_googletest//:gtest_main", 65 ], 66) for test in bigtable_benchmarks_unit_tests] 67