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    default_team: "trendy_team_android_kernel",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_defaults {
21    name: "vts_treble_vintf_test_defaults",
22    cflags: [
23        "-Wall",
24        "-Werror",
25    ],
26    shared_libs: [
27        "libbase",
28        "libbinder",
29        "libcutils",
30        "libhidlbase",
31        "liblog",
32        "libutils",
33        "libz",
34    ],
35    static_libs: [
36        "apex_aidl_interface-cpp",
37        "libaidlmetadata",
38        "libgmock",
39        "libhidl-gen-hash",
40        "libhidl-gen-utils",
41        "libhidlmetadata",
42        "libprocpartition",
43        "libselinux",
44        "libtinyxml2",
45        "libvintf",
46        "libvts_vintf_test_common",
47    ],
48    srcs: [
49        "VtsTrebleVintfTestBase.cpp",
50        "utils.cpp",
51        "main.cpp",
52    ],
53    data: [
54        ":android.hardware",
55        ":android.frameworks",
56        ":android.system",
57        ":android.hidl",
58    ],
59}
60
61// Test vendor image that has the highest target FCM version. This test binary
62// has no system XML dependencies.
63cc_test {
64    name: "vts_treble_vintf_vendor_test",
65    //Use test_config for vts suite.
66    test_config: "vts_treble_vintf_vendor_test.xml",
67    test_suites: [
68        "vts",
69        "general-tests",
70    ],
71    defaults: ["vts_treble_vintf_test_defaults"],
72    srcs: [
73        "DeviceManifestTest.cpp",
74        "DeviceMatrixTest.cpp",
75        "SingleManifestTest.cpp",
76    ],
77}
78
79// Check for HIDL services on device launching after Android 14.
80cc_test {
81    name: "vts_treble_no_hidl",
82
83    test_suites: [
84        "vts",
85        "general-tests",
86    ],
87    defaults: ["vts_treble_vintf_test_defaults"],
88    srcs: [
89        "VtsNoHidl.cpp",
90    ],
91}
92
93// Test a (potentially) compatible vendor image with framework dependency;
94// test the current framework.
95cc_test {
96    name: "vts_treble_vintf_framework_test",
97    //Use test_config for vts suite.
98    test_config: "vts_treble_vintf_framework_test.xml",
99    test_suites: [
100        "vts",
101        "general-tests",
102    ],
103    defaults: ["vts_treble_vintf_test_defaults"],
104    srcs: [
105        "SingleManifestTest.cpp",
106        "SystemVendorTest.cpp",
107    ],
108}
109
110// Tests everything.
111// Should not be used by VTS framework, but could be used for test development.
112// VTS framework should choose among the other test binaries defined above.
113cc_test {
114    name: "vts_treble_vintf_test_all",
115    defaults: ["vts_treble_vintf_test_defaults"],
116    srcs: [
117        "DeviceManifestTest.cpp",
118        "DeviceMatrixTest.cpp",
119        "SingleManifestTest.cpp",
120        "SystemVendorTest.cpp",
121    ],
122}
123