Update bundled GoogleTest to current HEAD
[alexxy/gromacs.git] / src / external / googletest / googlemock / test / BUILD.bazel
1 # Copyright 2017 Google Inc.
2 # All Rights Reserved.
3 #
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are
7 # met:
8 #
9 #     * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #     * Redistributions in binary form must reproduce the above
12 # copyright notice, this list of conditions and the following disclaimer
13 # in the documentation and/or other materials provided with the
14 # distribution.
15 #     * Neither the name of Google Inc. nor the names of its
16 # contributors may be used to endorse or promote products derived from
17 # this software without specific prior written permission.
18 #
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #
31 #   Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
32
33 load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
34 load("@rules_python//python:defs.bzl", "py_library", "py_test")
35
36 licenses(["notice"])
37
38 # Tests for GMock itself
39 cc_test(
40     name = "gmock_all_test",
41     size = "small",
42     srcs = glob(include = ["gmock-*.cc"]),
43     linkopts = select({
44         "//:qnx": [],
45         "//:windows": [],
46         "//conditions:default": ["-pthread"],
47     }),
48     deps = ["//:gtest"],
49 )
50
51 # Python tests
52 py_library(
53     name = "gmock_test_utils",
54     testonly = 1,
55     srcs = ["gmock_test_utils.py"],
56     deps = [
57         "//googletest/test:gtest_test_utils",
58     ],
59 )
60
61 cc_binary(
62     name = "gmock_leak_test_",
63     testonly = 1,
64     srcs = ["gmock_leak_test_.cc"],
65     deps = ["//:gtest_main"],
66 )
67
68 py_test(
69     name = "gmock_leak_test",
70     size = "medium",
71     srcs = ["gmock_leak_test.py"],
72     data = [
73         ":gmock_leak_test_",
74         ":gmock_test_utils",
75     ],
76     tags = [
77         "no_test_msvc2015",
78         "no_test_msvc2017",
79     ],
80 )
81
82 cc_test(
83     name = "gmock_link_test",
84     size = "small",
85     srcs = [
86         "gmock_link2_test.cc",
87         "gmock_link_test.cc",
88         "gmock_link_test.h",
89     ],
90     deps = ["//:gtest_main"],
91 )
92
93 cc_binary(
94     name = "gmock_output_test_",
95     srcs = ["gmock_output_test_.cc"],
96     deps = ["//:gtest"],
97 )
98
99 py_test(
100     name = "gmock_output_test",
101     size = "medium",
102     srcs = ["gmock_output_test.py"],
103     data = [
104         ":gmock_output_test_",
105         ":gmock_output_test_golden.txt",
106     ],
107     tags = [
108         "no_test_msvc2015",
109         "no_test_msvc2017",
110     ],
111     deps = [":gmock_test_utils"],
112 )
113
114 cc_test(
115     name = "gmock_test",
116     size = "small",
117     srcs = ["gmock_test.cc"],
118     deps = ["//:gtest_main"],
119 )