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 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 17 | cc_defaults { |
| 18 | name: "test_libbinder_ndk_defaults", |
| 19 | shared_libs: [ |
| 20 | "libbase", |
| 21 | ], |
| 22 | strip: { |
| 23 | none: true, |
| 24 | }, |
| 25 | cflags: [ |
| 26 | "-O0", |
| 27 | "-g", |
| 28 | ], |
| 29 | } |
| 30 | |
| 31 | cc_library_static { |
| 32 | name: "test_libbinder_ndk_library", |
| 33 | defaults: ["test_libbinder_ndk_defaults"], |
| 34 | export_include_dirs: ["include"], |
| 35 | shared_libs: ["libbinder_ndk"], |
| 36 | export_shared_lib_headers: ["libbinder_ndk"], |
| 37 | srcs: ["iface.cpp"], |
| 38 | } |
| 39 | |
| 40 | cc_defaults { |
| 41 | name: "test_libbinder_ndk_test_defaults", |
| 42 | defaults: ["test_libbinder_ndk_defaults"], |
| 43 | shared_libs: [ |
Jooyung Han | 1f65e77 | 2019-03-07 16:55:04 +0900 | [diff] [blame] | 44 | "libandroid_runtime_lazy", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 45 | "libbase", |
| 46 | "libbinder", |
Steven Moreland | a9fff71 | 2019-08-08 16:00:12 -0700 | [diff] [blame] | 47 | "libbinder_ndk", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 48 | "libutils", |
| 49 | ], |
| 50 | static_libs: [ |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 51 | "test_libbinder_ndk_library", |
| 52 | ], |
| 53 | } |
| 54 | |
Steven Moreland | 507547f | 2018-11-06 15:58:05 -0800 | [diff] [blame] | 55 | // This test is a unit test of the low-level API that is presented here, |
| 56 | // specifically the parts which are outside of the NDK. Actual users should |
| 57 | // also instead use AIDL to generate these stubs. See android.binder.cts. |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 58 | cc_test { |
Steven Moreland | f92c1fa | 2020-01-24 13:25:15 -0800 | [diff] [blame] | 59 | name: "libbinder_ndk_unit_test", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 60 | defaults: ["test_libbinder_ndk_test_defaults"], |
Steven Moreland | f92c1fa | 2020-01-24 13:25:15 -0800 | [diff] [blame] | 61 | srcs: ["libbinder_ndk_unit_test.cpp"], |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame^] | 62 | static_libs: [ |
| 63 | "IBinderNdkUnitTest-ndk_platform", |
| 64 | ], |
Steven Moreland | f92c1fa | 2020-01-24 13:25:15 -0800 | [diff] [blame] | 65 | test_suites: ["general-tests"], |
Steven Moreland | c5fe7e4 | 2020-01-29 10:42:58 -0800 | [diff] [blame] | 66 | require_root: true, |
| 67 | |
| 68 | // force since binderVendorDoubleLoadTest has its own |
| 69 | auto_gen_config: true, |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 70 | } |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 71 | |
| 72 | cc_test { |
| 73 | name: "binderVendorDoubleLoadTest", |
| 74 | vendor: true, |
| 75 | srcs: [ |
| 76 | "binderVendorDoubleLoadTest.cpp", |
| 77 | ], |
| 78 | static_libs: [ |
| 79 | "IBinderVendorDoubleLoadTest-cpp", |
| 80 | "IBinderVendorDoubleLoadTest-ndk_platform", |
Steven Moreland | 82c97cf | 2019-10-16 16:29:27 -0700 | [diff] [blame] | 81 | "libbinder_aidl_test_stub-ndk_platform", |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 82 | ], |
| 83 | shared_libs: [ |
| 84 | "libbase", |
| 85 | "libbinder", |
| 86 | "libbinder_ndk", |
| 87 | "libutils", |
| 88 | ], |
Steven Moreland | 4eb6f63 | 2020-01-24 13:32:21 -0800 | [diff] [blame] | 89 | test_suites: ["general-tests"], |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | aidl_interface { |
| 93 | name: "IBinderVendorDoubleLoadTest", |
Steven Moreland | 4527799 | 2020-01-16 16:04:33 -0800 | [diff] [blame] | 94 | vendor: true, |
Steven Moreland | d201734 | 2019-07-22 14:30:11 -0700 | [diff] [blame] | 95 | srcs: [ |
| 96 | "IBinderVendorDoubleLoadTest.aidl", |
| 97 | ], |
| 98 | } |
Steven Moreland | 169bb8f | 2020-01-29 10:21:35 -0800 | [diff] [blame^] | 99 | |
| 100 | aidl_interface { |
| 101 | name: "IBinderNdkUnitTest", |
| 102 | srcs: [ |
| 103 | "IBinderNdkUnitTest.aidl", |
| 104 | "IEmpty.aidl", |
| 105 | ], |
| 106 | } |