blob: 7c271f67cbe71fb8192b2cb7b9c6cba243041003 [file] [log] [blame]
Steven Moreland2e87adc2018-08-20 19:47:00 -07001/*
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 Moreland2e87adc2018-08-20 19:47:00 -070017cc_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
31cc_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
40cc_defaults {
41 name: "test_libbinder_ndk_test_defaults",
42 defaults: ["test_libbinder_ndk_defaults"],
Steven Moreland13f84662020-07-23 21:30:41 +000043 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Moreland2e87adc2018-08-20 19:47:00 -070044 shared_libs: [
Jooyung Han1f65e772019-03-07 16:55:04 +090045 "libandroid_runtime_lazy",
Steven Moreland2e87adc2018-08-20 19:47:00 -070046 "libbase",
47 "libbinder",
Steven Morelanda9fff712019-08-08 16:00:12 -070048 "libbinder_ndk",
Steven Moreland2e87adc2018-08-20 19:47:00 -070049 "libutils",
50 ],
51 static_libs: [
Steven Moreland2e87adc2018-08-20 19:47:00 -070052 "test_libbinder_ndk_library",
53 ],
54}
55
Steven Moreland507547f2018-11-06 15:58:05 -080056// This test is a unit test of the low-level API that is presented here,
57// specifically the parts which are outside of the NDK. Actual users should
58// also instead use AIDL to generate these stubs. See android.binder.cts.
Steven Moreland2e87adc2018-08-20 19:47:00 -070059cc_test {
Steven Morelandf92c1fa2020-01-24 13:25:15 -080060 name: "libbinder_ndk_unit_test",
Steven Moreland2e87adc2018-08-20 19:47:00 -070061 defaults: ["test_libbinder_ndk_test_defaults"],
Steven Morelandf92c1fa2020-01-24 13:25:15 -080062 srcs: ["libbinder_ndk_unit_test.cpp"],
Steven Moreland169bb8f2020-01-29 10:21:35 -080063 static_libs: [
Ruchir Rastogicc7a7462020-01-31 14:29:15 -080064 "IBinderNdkUnitTest-cpp",
Steven Moreland169bb8f2020-01-29 10:21:35 -080065 "IBinderNdkUnitTest-ndk_platform",
66 ],
Steven Moreland13f84662020-07-23 21:30:41 +000067 test_suites: ["general-tests", "vts"],
Steven Morelandc5fe7e42020-01-29 10:42:58 -080068 require_root: true,
69
70 // force since binderVendorDoubleLoadTest has its own
71 auto_gen_config: true,
Steven Moreland2e87adc2018-08-20 19:47:00 -070072}
Steven Morelandd2017342019-07-22 14:30:11 -070073
74cc_test {
75 name: "binderVendorDoubleLoadTest",
76 vendor: true,
77 srcs: [
78 "binderVendorDoubleLoadTest.cpp",
79 ],
80 static_libs: [
81 "IBinderVendorDoubleLoadTest-cpp",
82 "IBinderVendorDoubleLoadTest-ndk_platform",
Steven Moreland82c97cf2019-10-16 16:29:27 -070083 "libbinder_aidl_test_stub-ndk_platform",
Steven Morelandd2017342019-07-22 14:30:11 -070084 ],
Steven Moreland13f84662020-07-23 21:30:41 +000085 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelandd2017342019-07-22 14:30:11 -070086 shared_libs: [
87 "libbase",
88 "libbinder",
89 "libbinder_ndk",
90 "libutils",
91 ],
Steven Moreland13f84662020-07-23 21:30:41 +000092 test_suites: ["general-tests", "vts"],
Steven Morelandd2017342019-07-22 14:30:11 -070093}
94
95aidl_interface {
96 name: "IBinderVendorDoubleLoadTest",
Jiyong Park701fa1a2020-04-13 12:55:44 +090097 unstable: true,
Steven Moreland45277992020-01-16 16:04:33 -080098 vendor: true,
Steven Morelandd2017342019-07-22 14:30:11 -070099 srcs: [
100 "IBinderVendorDoubleLoadTest.aidl",
101 ],
102}
Steven Moreland169bb8f2020-01-29 10:21:35 -0800103
104aidl_interface {
105 name: "IBinderNdkUnitTest",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900106 unstable: true,
Steven Moreland169bb8f2020-01-29 10:21:35 -0800107 srcs: [
108 "IBinderNdkUnitTest.aidl",
109 "IEmpty.aidl",
110 ],
111}