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_platform", 75 ], 76 test_suites: ["general-tests", "vts"], 77 require_root: true, 78} 79 80cc_test { 81 name: "binderVendorDoubleLoadTest", 82 vendor: true, 83 srcs: [ 84 "binderVendorDoubleLoadTest.cpp", 85 ], 86 static_libs: [ 87 "IBinderVendorDoubleLoadTest-cpp", 88 "IBinderVendorDoubleLoadTest-ndk_platform", 89 "libbinder_aidl_test_stub-ndk_platform", 90 ], 91 // critical that libbinder/libbinder_ndk are shared for VTS 92 shared_libs: [ 93 "libbase", 94 "libbinder", 95 "libbinder_ndk", 96 "libutils", 97 ], 98 test_suites: ["general-tests"], 99 require_root: true, 100} 101 102aidl_interface { 103 name: "IBinderVendorDoubleLoadTest", 104 unstable: true, 105 vendor: true, 106 srcs: [ 107 "IBinderVendorDoubleLoadTest.aidl", 108 ], 109} 110 111aidl_interface { 112 name: "IBinderNdkUnitTest", 113 unstable: true, 114 srcs: [ 115 "IBinderNdkUnitTest.aidl", 116 "IEmpty.aidl", 117 ], 118} 119