• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2017 The Android Open Source Project
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 {
16    // http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // the below license kinds from "system_libvintf_license":
19    //   SPDX-license-identifier-Apache-2.0
20    default_applicable_licenses: ["system_libvintf_license"],
21}
22
23cc_test {
24    name: "libvintf_test",
25    defaults: ["libvintf-defaults"],
26    host_supported: true,
27    gtest: false,
28    tidy_timeout_srcs: [
29        "LibVintfTest.cpp",
30    ],
31    srcs: [
32        "AssembleVintfTest.cpp",
33        "LibVintfTest.cpp",
34    ],
35
36    header_libs: [
37        "libvintf_local_headers",
38    ],
39
40    shared_libs: [
41        "libbase",
42        "libcutils",
43        "liblog",
44        "libvintf",
45    ],
46    static_libs: [
47        "libgmock",
48        "libgtest",
49        "libassemblevintf",
50        "libhidl-gen-utils",
51        "libvts_vintf_test_common",
52    ],
53
54    cflags: [
55        "-O0",
56        "-g",
57        "-Wno-deprecated-declarations",
58    ],
59    target: {
60        android: {
61            cflags: ["-DLIBVINTF_TARGET"],
62            test_config: "libvintf_test.xml",
63        },
64    },
65
66    test_suites: [
67        "general-tests",
68    ],
69    test_options: {
70        unit_test: true,
71    },
72}
73
74cc_test {
75    name: "vintf_object_test",
76    defaults: ["libvintf-defaults"],
77    host_supported: true,
78    native_coverage: true,
79    tidy_timeout_srcs: [
80        "vintf_object_tests.cpp",
81    ],
82    srcs: [
83        "RuntimeInfo-fake.cpp",
84        "vintf_object_tests.cpp",
85    ],
86    shared_libs: [
87        "libbase",
88        "libcutils",
89        "liblog",
90        "libselinux",
91        "libtinyxml2",
92    ],
93    static_libs: [
94        "libgtest",
95        "libgmock",
96        "libvintf",
97        "libhidl-gen-utils",
98        "libz",
99    ],
100    header_libs: [
101        "libvintf_local_headers",
102    ],
103    cflags: [
104        "-O0",
105        "-g",
106    ],
107    target: {
108        android: {
109            cflags: ["-DLIBVINTF_TARGET"],
110            test_config: "vintf_object_test.xml",
111        },
112    },
113
114    test_suites: [
115        "general-tests",
116    ],
117    test_options: {
118        unit_test: true,
119    },
120}
121
122cc_test_host {
123    name: "libvintffm_test",
124    defaults: ["libvintffm-defaults"],
125    static_libs: [
126        "libc++fs",
127        "libgmock",
128        "libvintffm",
129    ],
130    srcs: [
131        "VintfFmTest.cpp",
132    ],
133}
134
135cc_test_host {
136    name: "vintf_object_recovery_test",
137    defaults: [
138        "libvintf-defaults",
139        "libvintf_static_user_defaults",
140    ],
141    static_libs: [
142        "libgmock",
143        "libvintf",
144        "libutils",
145    ],
146    header_libs: [
147        "libvintf_local_headers",
148    ],
149    srcs: [
150        "RuntimeInfo-fake.cpp",
151        "VintfObjectRecoveryTest.cpp",
152    ],
153}
154