| /* | |
| * Copyright (C) 2018 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| package { | |
| // See: http://go/android-license-faq | |
| // A large-scale-change added 'default_applicable_licenses' to import | |
| // all of the 'license_kinds' from "frameworks_native_libs_binder_ndk_license" | |
| // to get the below license kinds: | |
| // SPDX-license-identifier-Apache-2.0 | |
| default_applicable_licenses: ["frameworks_native_libs_binder_ndk_license"], | |
| } | |
| cc_defaults { | |
| name: "test_libbinder_ndk_defaults", | |
| shared_libs: [ | |
| "libbase", | |
| ], | |
| strip: { | |
| none: true, | |
| }, | |
| cflags: [ | |
| "-O0", | |
| "-g", | |
| "-Wall", | |
| "-Wextra", | |
| "-Wextra-semi", | |
| "-Werror", | |
| "-Winconsistent-missing-override", | |
| ], | |
| } | |
| cc_library_static { | |
| name: "test_libbinder_ndk_library", | |
| defaults: ["test_libbinder_ndk_defaults"], | |
| export_include_dirs: ["include"], | |
| shared_libs: ["libbinder_ndk"], | |
| export_shared_lib_headers: ["libbinder_ndk"], | |
| srcs: ["iface.cpp"], | |
| } | |
| cc_defaults { | |
| name: "test_libbinder_ndk_test_defaults", | |
| defaults: ["test_libbinder_ndk_defaults"], | |
| // critical that libbinder/libbinder_ndk are shared for VTS | |
| shared_libs: [ | |
| "libandroid_runtime_lazy", | |
| "libbase", | |
| "libbinder", | |
| "libbinder_ndk", | |
| "libutils", | |
| ], | |
| static_libs: [ | |
| "test_libbinder_ndk_library", | |
| ], | |
| } | |
| // This test is a unit test of the low-level API that is presented here, | |
| // specifically the parts which are outside of the NDK. Actual users should | |
| // also instead use AIDL to generate these stubs. See android.binder.cts. | |
| cc_test { | |
| name: "libbinder_ndk_unit_test", | |
| defaults: ["test_libbinder_ndk_test_defaults"], | |
| srcs: ["libbinder_ndk_unit_test.cpp"], | |
| static_libs: [ | |
| "IBinderNdkUnitTest-cpp", | |
| "IBinderNdkUnitTest-ndk", | |
| ], | |
| test_suites: [ | |
| "general-tests", | |
| "vts", | |
| ], | |
| require_root: true, | |
| } | |
| cc_test_host { | |
| name: "libbinder_ndk_unit_test_host", | |
| defaults: ["test_libbinder_ndk_defaults"], | |
| srcs: ["libbinder_ndk_unit_test_host.cpp"], | |
| test_suites: [ | |
| "general-tests", | |
| ], | |
| test_options: { | |
| unit_test: true, | |
| }, | |
| static_libs: [ | |
| "libbase", | |
| "libbinder_ndk", | |
| "libbinder", | |
| "libcutils", | |
| "libfakeservicemanager", | |
| "libgmock", | |
| "liblog", | |
| "libutils", | |
| ], | |
| } | |
| cc_test { | |
| name: "binderVendorDoubleLoadTest", | |
| vendor: true, | |
| srcs: [ | |
| "binderVendorDoubleLoadTest.cpp", | |
| ], | |
| static_libs: [ | |
| "IBinderVendorDoubleLoadTest-cpp", | |
| "IBinderVendorDoubleLoadTest-ndk", | |
| "libbinder_aidl_test_stub-ndk", | |
| ], | |
| // critical that libbinder/libbinder_ndk are shared for VTS | |
| shared_libs: [ | |
| "libbase", | |
| "libbinder", | |
| "libbinder_ndk", | |
| "libutils", | |
| ], | |
| test_suites: ["general-tests"], | |
| require_root: true, | |
| } | |
| aidl_interface { | |
| name: "IBinderVendorDoubleLoadTest", | |
| unstable: true, | |
| vendor: true, | |
| srcs: [ | |
| "IBinderVendorDoubleLoadTest.aidl", | |
| ], | |
| } | |
| aidl_interface { | |
| name: "IBinderNdkUnitTest", | |
| unstable: true, | |
| srcs: [ | |
| "IBinderNdkUnitTest.aidl", | |
| "IEmpty.aidl", | |
| ], | |
| backend: { | |
| java: { | |
| enabled: false, | |
| }, | |
| ndk: { | |
| apps_enabled: false, | |
| }, | |
| }, | |
| } |