• 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        "libvts_vintf_test_common",
51    ],
52
53    cflags: [
54        "-O0",
55        "-g",
56        "-Wno-deprecated-declarations",
57    ],
58    target: {
59        android: {
60            cflags: ["-DLIBVINTF_TARGET"],
61            test_config: "libvintf_test.xml",
62        },
63    },
64
65    test_suites: [
66        "general-tests",
67    ],
68    test_options: {
69        unit_test: true,
70    },
71}
72
73cc_test {
74    name: "vintf_object_test",
75    defaults: ["libvintf-defaults"],
76    host_supported: true,
77    native_coverage: true,
78    tidy_timeout_srcs: [
79        "vintf_object_tests.cpp",
80    ],
81    srcs: [
82        "RuntimeInfo-fake.cpp",
83        "vintf_object_tests.cpp",
84    ],
85    shared_libs: [
86        "libbase",
87        "libcutils",
88        "liblog",
89        "libselinux",
90        "libtinyxml2",
91    ],
92    static_libs: [
93        "libgtest",
94        "libgmock",
95        "libvintf",
96        "libz",
97    ],
98    header_libs: [
99        "libvintf_local_headers",
100    ],
101    cflags: [
102        "-O0",
103        "-g",
104    ],
105    target: {
106        android: {
107            cflags: ["-DLIBVINTF_TARGET"],
108            test_config: "vintf_object_test.xml",
109        },
110    },
111
112    test_suites: [
113        "general-tests",
114    ],
115    test_options: {
116        unit_test: true,
117    },
118}
119
120cc_test_host {
121    name: "libvintffm_test",
122    defaults: ["libvintffm-defaults"],
123    static_libs: [
124        "libc++fs",
125        "libgmock",
126        "libvintffm",
127    ],
128    srcs: [
129        "VintfFmTest.cpp",
130    ],
131}
132
133cc_test_host {
134    name: "vintf_object_recovery_test",
135    defaults: [
136        "libvintf-defaults",
137        "libvintf_static_user_defaults",
138    ],
139    static_libs: [
140        "libgmock",
141        "libvintf",
142        "libutils",
143    ],
144    header_libs: [
145        "libvintf_local_headers",
146    ],
147    srcs: [
148        "RuntimeInfo-fake.cpp",
149        "VintfObjectRecoveryTest.cpp",
150    ],
151}
152