aboutsummaryrefslogtreecommitdiff
path: root/googlemock/test/Android.bp
blob: 17c5bca8c8148e90e5bd0ba2a3b4df2903445bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "external_googletest_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-BSD
    default_applicable_licenses: ["external_googletest_license"],
}

cc_defaults {
    name: "gmock_test_defaults",
    host_supported: true,
    gtest: false,
    cflags: [
        "-Wall",
        "-Werror",
        "-Wno-sign-compare",
        "-Wno-unused-parameter",
        "-Wno-unused-private-field",
    ],
    include_dirs: [
        "external/googletest/googlemock",
        "external/googletest/googletest",
    ],
    static_libs: [
        "libgmock_main",
        "libgmock",
        "libgtest",
    ],
}

cc_test {
    name: "gmock_tests",
    defaults: ["gmock_test_defaults"],
    test_per_src: true,
    srcs: [
        "gmock-actions_test.cc",
        "gmock-cardinalities_test.cc",

        // Test is disabled because Android doesn't build gmock with exceptions.
        //"gmock_ex_test.cc",

        "gmock-internal-utils_test.cc",
        "gmock-matchers_test.cc",
        "gmock-more-actions_test.cc",
        "gmock-nice-strict_test.cc",
        "gmock-port_test.cc",
        "gmock-spec-builders_test.cc",
        "gmock_test.cc",
    ],
}

cc_test {
    name: "gmock_link_test",
    defaults: ["gmock_test_defaults"],
    relative_install_path: "gmock_tests",
    no_named_install_directory: true,
    srcs: [
        "gmock_link_test.cc",
        "gmock_link2_test.cc",
    ],
}