• 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    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        ":libvintf_service_info_aidl",
53    ],
54    data: [
55        ":android.hardware",
56        ":android.frameworks",
57        ":android.system",
58        ":android.hidl",
59    ],
60}
61
62filegroup {
63    name: "libvintf_service_info_aidl",
64    srcs: [
65        "aidl/android/vintf/ServiceInfo.aidl",
66        "aidl/android/vintf/IServiceInfoFetcher.aidl",
67    ],
68    path: "aidl",
69}
70
71// Test vendor image that has the highest target FCM version. This test binary
72// has no system XML dependencies.
73cc_test {
74    name: "vts_treble_vintf_vendor_test",
75    //Use test_config for vts suite.
76    test_config: "vts_treble_vintf_vendor_test.xml",
77    test_suites: [
78        "vts",
79        "general-tests",
80    ],
81    defaults: ["vts_treble_vintf_test_defaults"],
82    srcs: [
83        "DeviceManifestTest.cpp",
84        "DeviceMatrixTest.cpp",
85        "SingleManifestTest.cpp",
86    ],
87}
88
89cc_test {
90    name: "vts_treble_vintf_trusted_hal_test",
91    //Use test_config for vts suite.
92    test_config: "vts_treble_vintf_trusted_hal_test.xml",
93    test_suites: [
94        "vts",
95        "general-tests",
96    ],
97    defaults: ["vts_treble_vintf_test_defaults"],
98    srcs: [
99        "DeviceManifestTest.cpp",
100        "DeviceMatrixTest.cpp",
101        "SingleManifestTest.cpp",
102    ],
103    data: [
104        ":trusty_test_vm_elf",
105        ":trusty_test_vm_config",
106        ":trusty_vm_launcher_sh",
107        ":trusty_wait_ready_sh",
108        ":trusty-ut-ctrl.system",
109    ],
110    cflags: [
111        "-DTRUSTED_HAL_TEST",
112    ],
113    enabled: false,
114    arch: {
115        arm64: {
116            enabled: true,
117        },
118    },
119}
120
121// Check for HIDL services on device launching after Android 14.
122cc_test {
123    name: "vts_treble_no_hidl",
124
125    test_suites: [
126        "vts",
127        "general-tests",
128    ],
129    defaults: ["vts_treble_vintf_test_defaults"],
130    srcs: [
131        "VtsNoHidl.cpp",
132    ],
133}
134
135// Test a (potentially) compatible vendor image with framework dependency;
136// test the current framework.
137cc_test {
138    name: "vts_treble_vintf_framework_test",
139    //Use test_config for vts suite.
140    test_config: "vts_treble_vintf_framework_test.xml",
141    test_suites: [
142        "vts",
143        "general-tests",
144    ],
145    defaults: ["vts_treble_vintf_test_defaults"],
146    srcs: [
147        "SingleManifestTest.cpp",
148        "SystemVendorTest.cpp",
149    ],
150}
151
152// Tests everything.
153// Should not be used by VTS framework, but could be used for test development.
154// VTS framework should choose among the other test binaries defined above.
155cc_test {
156    name: "vts_treble_vintf_test_all",
157    defaults: ["vts_treble_vintf_test_defaults"],
158    srcs: [
159        "DeviceManifestTest.cpp",
160        "DeviceMatrixTest.cpp",
161        "SingleManifestTest.cpp",
162        "SystemVendorTest.cpp",
163    ],
164}
165