1/* 2 * Copyright (C) 2018 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 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "frameworks_native_libs_binder_ndk_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["frameworks_native_libs_binder_ndk_license"], 24} 25 26cc_defaults { 27 name: "test_libbinder_ndk_defaults", 28 shared_libs: [ 29 "libbase", 30 ], 31 strip: { 32 none: true, 33 }, 34 cflags: [ 35 "-O0", 36 "-g", 37 ], 38} 39 40cc_library_static { 41 name: "test_libbinder_ndk_library", 42 defaults: ["test_libbinder_ndk_defaults"], 43 export_include_dirs: ["include"], 44 shared_libs: ["libbinder_ndk"], 45 export_shared_lib_headers: ["libbinder_ndk"], 46 srcs: ["iface.cpp"], 47} 48 49cc_defaults { 50 name: "test_libbinder_ndk_test_defaults", 51 defaults: ["test_libbinder_ndk_defaults"], 52 // critical that libbinder/libbinder_ndk are shared for VTS 53 shared_libs: [ 54 "libandroid_runtime_lazy", 55 "libbase", 56 "libbinder", 57 "libbinder_ndk", 58 "libutils", 59 ], 60 static_libs: [ 61 "test_libbinder_ndk_library", 62 ], 63} 64 65// This test is a unit test of the low-level API that is presented here, 66// specifically the parts which are outside of the NDK. Actual users should 67// also instead use AIDL to generate these stubs. See android.binder.cts. 68cc_test { 69 name: "libbinder_ndk_unit_test", 70 defaults: ["test_libbinder_ndk_test_defaults"], 71 srcs: ["libbinder_ndk_unit_test.cpp"], 72 static_libs: [ 73 "IBinderNdkUnitTest-cpp", 74 "IBinderNdkUnitTest-ndk", 75 ], 76 test_suites: [ 77 "general-tests", 78 "vts", 79 ], 80 require_root: true, 81} 82 83cc_test_host { 84 name: "libbinder_ndk_unit_test_host", 85 defaults: ["test_libbinder_ndk_defaults"], 86 srcs: ["libbinder_ndk_unit_test_host.cpp"], 87 test_suites: [ 88 "general-tests", 89 ], 90 test_options: { 91 unit_test: true, 92 }, 93 static_libs: [ 94 "libbase", 95 "libbinder_ndk", 96 "libbinder", 97 "libcutils", 98 "libfakeservicemanager", 99 "libgmock", 100 "liblog", 101 "libutils", 102 ], 103} 104 105cc_test { 106 name: "binderVendorDoubleLoadTest", 107 vendor: true, 108 srcs: [ 109 "binderVendorDoubleLoadTest.cpp", 110 ], 111 static_libs: [ 112 "IBinderVendorDoubleLoadTest-cpp", 113 "IBinderVendorDoubleLoadTest-ndk", 114 "libbinder_aidl_test_stub-ndk", 115 ], 116 // critical that libbinder/libbinder_ndk are shared for VTS 117 shared_libs: [ 118 "libbase", 119 "libbinder", 120 "libbinder_ndk", 121 "libutils", 122 ], 123 test_suites: ["general-tests"], 124 require_root: true, 125} 126 127aidl_interface { 128 name: "IBinderVendorDoubleLoadTest", 129 unstable: true, 130 vendor: true, 131 srcs: [ 132 "IBinderVendorDoubleLoadTest.aidl", 133 ], 134} 135 136aidl_interface { 137 name: "IBinderNdkUnitTest", 138 unstable: true, 139 srcs: [ 140 "IBinderNdkUnitTest.aidl", 141 "IEmpty.aidl", 142 ], 143 backend: { 144 java: { 145 enabled: false, 146 }, 147 ndk: { 148 apps_enabled: false, 149 }, 150 }, 151} 152