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_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19cc_defaults {
20    name: "vts_treble_vintf_test_defaults",
21    cflags: [
22        "-Wall",
23        "-Werror",
24    ],
25    shared_libs: [
26        "libbase",
27        "libbinder",
28        "libcutils",
29        "libhidlbase",
30        "liblog",
31        "libutils",
32        "libz",
33    ],
34    static_libs: [
35        "apex_aidl_interface-cpp",
36        "libaidlmetadata",
37        "libgmock",
38        "libhidl-gen-hash",
39        "libhidl-gen-utils",
40        "libhidlmetadata",
41        "libprocpartition",
42        "libselinux",
43        "libtinyxml2",
44        "libvintf",
45        "libvts_vintf_test_common",
46    ],
47    group_static_libs: true,
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        "device-tests",
70    ],
71    defaults: ["vts_treble_vintf_test_defaults"],
72    srcs: [
73        "DeviceManifestTest.cpp",
74        "DeviceMatrixTest.cpp",
75        "SingleManifestTest.cpp",
76    ],
77}
78
79// Test a (potentially) compatible vendor image with framework dependency;
80// test the current framework.
81cc_test {
82    name: "vts_treble_vintf_framework_test",
83    //Use test_config for vts suite.
84    test_config: "vts_treble_vintf_framework_test.xml",
85    test_suites: [
86        "vts",
87        "device-tests",
88    ],
89    defaults: ["vts_treble_vintf_test_defaults"],
90    srcs: [
91        "SingleManifestTest.cpp",
92        "SystemVendorTest.cpp",
93    ],
94}
95
96// Tests everything.
97// Should not be used by VTS framework, but could be used for test development.
98// VTS framework should choose among the other test binaries defined above.
99cc_test {
100    name: "vts_treble_vintf_test_all",
101    defaults: ["vts_treble_vintf_test_defaults"],
102    srcs: [
103        "DeviceManifestTest.cpp",
104        "DeviceMatrixTest.cpp",
105        "SingleManifestTest.cpp",
106        "SystemVendorTest.cpp",
107    ],
108}
109