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