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_test { 16 name: "libvintf_test", 17 defaults: ["libvintf-defaults"], 18 host_supported: true, 19 gtest: false, 20 srcs: [ 21 "AssembleVintfTest.cpp", 22 "LibVintfTest.cpp", 23 ], 24 25 header_libs: [ 26 "libvintf_local_headers", 27 ], 28 29 shared_libs: [ 30 "libbase", 31 "libcutils", 32 "liblog", 33 "libvintf", 34 ], 35 static_libs: [ 36 "libgtest", 37 "libassemblevintf", 38 "libhidl-gen-utils", 39 ], 40 41 cflags: [ 42 "-O0", 43 "-g", 44 "-Wno-deprecated-declarations", 45 ], 46 target: { 47 android: { 48 cflags: ["-DLIBVINTF_TARGET"], 49 test_config: "libvintf_test.xml", 50 }, 51 }, 52 53 test_suites: [ 54 "general-tests", 55 ], 56} 57 58cc_test { 59 name: "vintf_object_test", 60 defaults: ["libvintf-defaults"], 61 host_supported: true, 62 native_coverage: true, 63 srcs: [ 64 "RuntimeInfo-fake.cpp", 65 "vintf_object_tests.cpp", 66 ], 67 shared_libs: [ 68 "libbase", 69 "libcutils", 70 "liblog", 71 "libselinux", 72 "libtinyxml2", 73 ], 74 static_libs: [ 75 "libgtest", 76 "libgmock", 77 "libvintf", 78 "libhidl-gen-utils", 79 "libz", 80 ], 81 cflags: [ 82 "-O0", 83 "-g", 84 // Unexpected logging of string pointer warning from gmock 85 "-Wno-user-defined-warnings" 86 ], 87 target: { 88 android: { 89 cflags: ["-DLIBVINTF_TARGET"], 90 test_config: "vintf_object_test.xml", 91 }, 92 }, 93 94 test_suites: [ 95 "general-tests", 96 ], 97} 98 99