1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_team: "trendy_team_camera_framework", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22filegroup { 23 name: "cameraservice_vts_default_map", 24 srcs: ["cameraservice_vts_default.map"], 25} 26 27// VTS tests must link to HAL definition libraries statically. 28// We have a defaults that is separate from VtsHalTargetTestDefaults 29// since most VTS tests aren't vendor: true, so we'd still want to have 30// shared lib deps (libcutils, libutils etc) for them. 31cc_defaults { 32 name: "CameraServiceHalVtsTargetTestDefaults", 33 defaults: [ 34 "hidl_defaults", 35 ], 36 37 // Lists all dependencies that can *not* be expected on the device. 38 static_libs: [ 39 "VtsHalHidlTestUtils", 40 "libbase", 41 "libhidlbase", 42 "libcutils", 43 "libhidl-gen-utils", 44 "libutils", 45 ], 46 47 header_libs: [ 48 "libhidl_gtest_helper", 49 ], 50 51 // Lists all system dependencies that can be expected on the device. 52 shared_libs: [ 53 // All the following are dependencies of any HAL definition library. 54 "liblog", 55 ], 56 cflags: [ 57 "-O0", 58 "-g", 59 ], 60 61 target: { 62 android: { 63 shared_libs: [ 64 "libvndksupport", 65 ], 66 }, 67 }, 68 69 require_root: true, 70} 71 72cc_test { 73 name: "VtsHalCameraServiceV2_0TargetTest", 74 defaults: ["CameraServiceHalVtsTargetTestDefaults"], 75 76 vendor: true, 77 srcs: ["VtsHalCameraServiceV2_0TargetTest.cpp"], 78 static_libs: [ 79 "[email protected]", 80 "[email protected]", 81 "[email protected]", 82 "[email protected]", 83 "[email protected]", 84 "[email protected]", 85 "[email protected]", 86 "libfmq", 87 "libarect", 88 "libcamera_metadata", 89 ], 90 91 // This is a vendor test that needs can be run on older devices 92 // so should be built with a static stl as well, since if its built 93 // with a newer shared libc++, the older device may not have some symbols. 94 // b/333438055 elaborates on what can go wrong when libc++ is partially 95 // exported. 96 version_script: ":cameraservice_vts_default_map", 97 stl: "libc++_static", 98 shared_libs: [ 99 "libmediandk", 100 "libnativewindow", 101 "liblog", 102 ], 103 104 test_suites: ["vts"], 105} 106 107cc_test { 108 name: "VtsAidlCameraServiceTargetTest", 109 defaults: [ 110 "CameraServiceHalVtsTargetTestDefaults", 111 ], 112 113 vendor: true, 114 srcs: ["VtsAidlCameraServiceTargetTest.cpp"], 115 static_libs: [ 116 "android.hardware.common-V2-ndk", 117 "android.hardware.common.fmq-V1-ndk", 118 "android.hardware.camera.common-helper", 119 "android.frameworks.cameraservice.common-V1-ndk", 120 "android.frameworks.cameraservice.device-V2-ndk", 121 "android.frameworks.cameraservice.service-V2-ndk", 122 "libaidlcommonsupport", 123 "libfmq", 124 "libarect", 125 "libcamera_metadata", 126 ], 127 version_script: ":cameraservice_vts_default_map", 128 stl: "libc++_static", 129 shared_libs: [ 130 "libbinder_ndk", 131 "libmediandk", 132 "libnativewindow", 133 "liblog", 134 ], 135 136 test_config: "VtsAidlCameraServiceTargetTest.xml", 137 test_suites: ["vts"], 138} 139