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 srcs: [ 29 "AssembleVintfTest.cpp", 30 "LibVintfTest.cpp", 31 ], 32 33 header_libs: [ 34 "libvintf_local_headers", 35 ], 36 37 shared_libs: [ 38 "libbase", 39 "libcutils", 40 "liblog", 41 "libvintf", 42 ], 43 static_libs: [ 44 "libgmock", 45 "libgtest", 46 "libassemblevintf", 47 "libhidl-gen-utils", 48 "libvts_vintf_test_common", 49 ], 50 51 cflags: [ 52 "-O0", 53 "-g", 54 "-Wno-deprecated-declarations", 55 ], 56 target: { 57 android: { 58 cflags: ["-DLIBVINTF_TARGET"], 59 test_config: "libvintf_test.xml", 60 }, 61 }, 62 63 test_suites: [ 64 "general-tests", 65 ], 66 test_options: { 67 unit_test: true, 68 }, 69} 70 71cc_test { 72 name: "vintf_object_test", 73 defaults: ["libvintf-defaults"], 74 host_supported: true, 75 native_coverage: true, 76 srcs: [ 77 "RuntimeInfo-fake.cpp", 78 "vintf_object_tests.cpp", 79 ], 80 shared_libs: [ 81 "libbase", 82 "libcutils", 83 "liblog", 84 "libselinux", 85 "libtinyxml2", 86 ], 87 static_libs: [ 88 "libgtest", 89 "libgmock", 90 "libvintf", 91 "libhidl-gen-utils", 92 "libz", 93 ], 94 header_libs: [ 95 "libvintf_local_headers", 96 ], 97 cflags: [ 98 "-O0", 99 "-g", 100 ], 101 target: { 102 android: { 103 cflags: ["-DLIBVINTF_TARGET"], 104 test_config: "vintf_object_test.xml", 105 }, 106 }, 107 108 test_suites: [ 109 "general-tests", 110 ], 111 test_options: { 112 unit_test: true, 113 }, 114} 115 116cc_test_host { 117 name: "libvintffm_test", 118 defaults: ["libvintffm-defaults"], 119 static_libs: [ 120 "libc++fs", 121 "libgmock", 122 "libvintffm", 123 ], 124 srcs: [ 125 "VintfFmTest.cpp", 126 ], 127} 128