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