summaryrefslogtreecommitdiff
path: root/libs/binder/ndk/tests/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/ndk/tests/Android.bp')
-rw-r--r--libs/binder/ndk/tests/Android.bp118
1 files changed, 118 insertions, 0 deletions
diff --git a/libs/binder/ndk/tests/Android.bp b/libs/binder/ndk/tests/Android.bp
new file mode 100644
index 0000000000..bb51bf0b5d
--- /dev/null
+++ b/libs/binder/ndk/tests/Android.bp
@@ -0,0 +1,118 @@
+/*
+ * 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",
+ ],
+}
+
+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_platform",
+ ],
+ test_suites: ["general-tests", "vts"],
+ require_root: true,
+}
+
+cc_test {
+ name: "binderVendorDoubleLoadTest",
+ vendor: true,
+ srcs: [
+ "binderVendorDoubleLoadTest.cpp",
+ ],
+ static_libs: [
+ "IBinderVendorDoubleLoadTest-cpp",
+ "IBinderVendorDoubleLoadTest-ndk_platform",
+ "libbinder_aidl_test_stub-ndk_platform",
+ ],
+ // critical that libbinder/libbinder_ndk are shared for VTS
+ shared_libs: [
+ "libbase",
+ "libbinder",
+ "libbinder_ndk",
+ "libutils",
+ ],
+ test_suites: ["general-tests", "vts"],
+ 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",
+ ],
+}