Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 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 | |
Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 17 | package { |
| 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 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 26 | cc_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 | |
| 40 | cc_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 | |
| 49 | cc_defaults { |
| 50 | name: "test_libbinder_ndk_test_defaults", |
| 51 | defaults: ["test_libbinder_ndk_defaults"], |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 52 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 53 | shared_libs: [ |
Jooyung Han | 1f65e77 | 2019-03-07 16:55:04 +0900 | [diff] [blame] | 54 | "libandroid_runtime_lazy", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 55 | "libbase", |
| 56 | "libbinder", |
Steven Moreland | a9fff71 | 2019-08-08 16:00:12 -0700 | [diff] [blame] | 57 | "libbinder_ndk", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 58 | "libutils", |
| 59 | ], |
| 60 | static_libs: [ |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 61 | "test_libbinder_ndk_library", |
| 62 | ], |
| 63 | } |
| 64 | |
Steven Moreland | 507547f | 2018-11-06 15:58:05 -0800 | [diff] [blame] | 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. |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 68 | cc_test { |
Steven Moreland | f92c1fa | 2020-01-24 13:25:15 -0800 | [diff] [blame] | 69 | name: "libbinder_ndk_unit_test", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 70 | defaults: ["test_libbinder_ndk_test_defaults"], |
Steven Moreland | f92c1fa | 2020-01-24 13:25:15 -0800 | [diff] [blame] | 71 | srcs: ["libbinder_ndk_unit_test.cpp"], |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame] | 72 | static_libs: [ |
Ruchir Rastogi | cc7a746 | 2020-01-31 14:29:15 -0800 | [diff] [blame] | 73 | "IBinderNdkUnitTest-cpp", |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame] | 74 | "IBinderNdkUnitTest-ndk_platform", |
| 75 | ], |
Steven Moreland | 326086c | 2021-06-16 18:30:42 +0000 | [diff] [blame] | 76 | test_suites: [ |
| 77 | "general-tests", |
| 78 | "vts", |
| 79 | ], |
Steven Moreland | c5fe7e4 | 2020-01-29 10:42:58 -0800 | [diff] [blame] | 80 | require_root: true, |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 81 | } |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 82 | |
| 83 | cc_test { |
| 84 | name: "binderVendorDoubleLoadTest", |
| 85 | vendor: true, |
| 86 | srcs: [ |
| 87 | "binderVendorDoubleLoadTest.cpp", |
| 88 | ], |
| 89 | static_libs: [ |
| 90 | "IBinderVendorDoubleLoadTest-cpp", |
| 91 | "IBinderVendorDoubleLoadTest-ndk_platform", |
Steven Moreland | 82c97cf | 2019-10-16 16:29:27 -0700 | [diff] [blame] | 92 | "libbinder_aidl_test_stub-ndk_platform", |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 93 | ], |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 94 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 95 | shared_libs: [ |
| 96 | "libbase", |
| 97 | "libbinder", |
| 98 | "libbinder_ndk", |
| 99 | "libutils", |
| 100 | ], |
Steven Moreland | 105db55 | 2021-06-02 21:50:33 +0000 | [diff] [blame] | 101 | test_suites: ["general-tests"], |
Colin Cross | 9d43688 | 2020-09-08 14:24:55 -0700 | [diff] [blame] | 102 | require_root: true, |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | aidl_interface { |
| 106 | name: "IBinderVendorDoubleLoadTest", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 107 | unstable: true, |
Steven Moreland | 4527799 | 2020-01-16 16:04:33 -0800 | [diff] [blame] | 108 | vendor: true, |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 109 | srcs: [ |
| 110 | "IBinderVendorDoubleLoadTest.aidl", |
| 111 | ], |
| 112 | } |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame] | 113 | |
| 114 | aidl_interface { |
| 115 | name: "IBinderNdkUnitTest", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 116 | unstable: true, |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame] | 117 | srcs: [ |
| 118 | "IBinderNdkUnitTest.aidl", |
| 119 | "IEmpty.aidl", |
| 120 | ], |
Steven Moreland | 326086c | 2021-06-16 18:30:42 +0000 | [diff] [blame] | 121 | backend: { |
| 122 | java: { |
| 123 | enabled: false, |
| 124 | }, |
| 125 | ndk: { |
| 126 | apps_enabled: false, |
| 127 | }, |
| 128 | }, |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame] | 129 | } |