Convert bionic benchmarks and tests to Android.bp
The compile-time tests and a few custom libraries for dynamic linker
testing are still compiled in make.
Also converts the make rules to run tests on the host to shell scripts
in tests/run-on-host.sh and benchmarks/run-on-host.sh
Change-Id: I6f174b3a69d58c4ed74d29f4e79332d483681534
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
new file mode 100644
index 0000000..0303138
--- /dev/null
+++ b/tests/libs/Android.bp
@@ -0,0 +1,443 @@
+//
+// Copyright (C) 2012 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.
+//
+
+cc_defaults {
+ name: "bionic_testlib_defaults",
+ host_supported: true,
+ sanitize: {
+ never: true,
+ },
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+// Library to test gnu-styled hash
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libgnu-hash-table-library",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlext_test_library.cpp"],
+ ldflags: ["-Wl,--hash-style=gnu"],
+ arch: {
+ mips: {
+ enabled: false,
+ },
+ mips64: {
+ enabled: false,
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+// Library to test sysv-styled hash
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libsysv-hash-table-library",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlext_test_library.cpp"],
+ ldflags: ["-Wl,--hash-style=sysv"],
+}
+
+// -----------------------------------------------------------------------------
+// Library used by dlext tests - with GNU RELRO program header
+// -----------------------------------------------------------------------------
+// In Android.mk to support creating symlinks
+
+// -----------------------------------------------------------------------------
+// Library used by dlext tests - without GNU RELRO program header
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libdlext_test_norelro",
+ srcs: ["dlext_test_library.cpp"],
+ ldflags: ["-Wl,-z,norelro"],
+ shared_libs = ["libtest_simple"],
+}
+
+// -----------------------------------------------------------------------------
+// Library used by dlext tests - different name non-default location
+// -----------------------------------------------------------------------------
+// In Android.mk to support installing to /data
+
+// -----------------------------------------------------------------------------
+// Libraries used by dlext tests for open from a zip-file
+// -----------------------------------------------------------------------------
+// In Android.mk to support installing to /data
+
+// ----------------------------------------------------------------------------
+// Library with soname which does not match filename
+// ----------------------------------------------------------------------------
+// In Android.mk to support zipped and aligned tests
+
+// -----------------------------------------------------------------------------
+// Library used by dlext tests - zipped and aligned
+// -----------------------------------------------------------------------------
+// In Android.mk to support zipped and aligned tests
+
+// -----------------------------------------------------------------------------
+// Library used by dlfcn tests
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_simple",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_simple.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library used by dlfcn nodelete tests
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_nodelete_1",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_nodelete_1.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library used by dlfcn nodelete tests
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_nodelete_2",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_nodelete_2.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library used by dlfcn nodelete tests
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_nodelete_dt_flags_1",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_nodelete_dt_flags_1.cpp"],
+ ldflags: ["-Wl,-z,nodelete"],
+}
+
+// -----------------------------------------------------------------------------
+// Build test helper libraries for linker namespaces
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.linker_namespaces.mk
+
+// -----------------------------------------------------------------------------
+// Build DT_RUNPATH test helper libraries
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.dt_runpath.mk
+
+// -----------------------------------------------------------------------------
+// Build library with two parents
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk
+
+// -----------------------------------------------------------------------------
+// Build libtest_check_order_dlsym.so with its dependencies.
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk
+
+// -----------------------------------------------------------------------------
+// Build libtest_check_order_siblings.so with its dependencies.
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk
+
+// -----------------------------------------------------------------------------
+// Build libtest_check_order_root.so with its dependencies.
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk
+
+// -----------------------------------------------------------------------------
+// Build libtest_versioned_lib.so with its dependencies.
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.versioned_lib.mk
+
+// -----------------------------------------------------------------------------
+// Build libraries needed by pthread_atfork tests
+// -----------------------------------------------------------------------------
+// include $(LOCAL_PATH)/Android.build.pthread_atfork.mk
+
+// -----------------------------------------------------------------------------
+// Library with dependency loop used by dlfcn tests
+//
+// libtest_with_dependency_loop -> a -> b -> c -> a
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_with_dependency_loop",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_loopy_root.cpp"],
+ shared_libs: ["libtest_with_dependency_loop_a"],
+}
+
+// -----------------------------------------------------------------------------
+// libtest_with_dependency_loop_a.so
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_with_dependency_loop_a",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_loopy_a.cpp"],
+ shared_libs: ["libtest_with_dependency_loop_b_tmp"],
+}
+
+// -----------------------------------------------------------------------------
+// libtest_with_dependency_loop_b.so
+//
+// this is temporary placeholder - will be removed
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_with_dependency_loop_b_tmp",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_loopy_invalid.cpp"],
+ ldflags: ["-Wl,-soname=libtest_with_dependency_loop_b.so"],
+}
+
+// -----------------------------------------------------------------------------
+// libtest_with_dependency_loop_b.so
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_with_dependency_loop_b",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_loopy_b.cpp"],
+ shared_libs: ["libtest_with_dependency_loop_c"],
+}
+
+// -----------------------------------------------------------------------------
+// libtest_with_dependency_loop_c.so
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_with_dependency_loop_c",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_loopy_c.cpp"],
+ shared_libs: ["libtest_with_dependency_loop_a"],
+}
+
+// -----------------------------------------------------------------------------
+// libtest_relo_check_dt_needed_order.so
+// |
+// +-> libtest_relo_check_dt_needed_order_1.so
+// |
+// +-> libtest_relo_check_dt_needed_order_2.so
+// -----------------------------------------------------------------------------
+
+
+cc_library {
+ name: "libtest_relo_check_dt_needed_order",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_relo_check_dt_needed_order.cpp"],
+ shared_libs: [
+ "libtest_relo_check_dt_needed_order_1",
+ "libtest_relo_check_dt_needed_order_2",
+ ],
+}
+
+cc_library {
+ name: "libtest_relo_check_dt_needed_order_1",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_relo_check_dt_needed_order_1.cpp"],
+}
+
+cc_library {
+ name: "libtest_relo_check_dt_needed_order_2",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_relo_check_dt_needed_order_2.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library with dependency used by dlfcn tests
+// -----------------------------------------------------------------------------
+// In Android.mk to support dependency on libdlext_test
+
+// -----------------------------------------------------------------------------
+// Library used by ifunc tests
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_ifunc",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_ifunc.c"],
+
+ // TODO(dimitry): clang does not support ifunc attribute
+ clang: false,
+ arch: {
+ mips: {
+ enabled: false,
+ },
+ mips64: {
+ enabled: false,
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+// Library used by atexit tests
+// -----------------------------------------------------------------------------
+
+cc_library {
+ name: "libtest_atexit",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["atexit_testlib.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// This library is used by dl_load test to check symbol preempting
+// by main executable
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libdl_preempt_test_1",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dl_preempt_library_1.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// This library is used by dl_load test to check symbol preempting
+// by libdl_preempt_test_1.so
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libdl_preempt_test_2",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dl_preempt_library_2.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library with DF_1_GLOBAL
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libdl_test_df_1_global",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dl_df_1_global.cpp"],
+ ldflags: ["-Wl,-z,global"],
+
+ target: {
+ host: {
+ // TODO (dimitry): host ld.gold does not yet support -z global
+ // remove this line once it is updated.
+ ldflags: ["-fuse-ld=bfd"],
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+// Library using symbol from libdl_test_df_1_global
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlsym_df_1_global",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dl_df_1_use_global.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library with weak function
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlsym_weak_func",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlsym_weak_function.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library to check RTLD_LOCAL with dlsym in 'this'
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlsym_from_this",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlsym_from_this_symbol.cpp"],
+ shared_libs: ["libtest_dlsym_from_this_child"],
+
+ target: {
+ android: {
+ shared_libs: ["libdl"],
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlsym_from_this_child",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlsym_from_this_functions.cpp"],
+ shared_libs: ["libtest_dlsym_from_this_grandchild"],
+}
+
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlsym_from_this_grandchild",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlsym_from_this_symbol2.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Empty library
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_empty",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["empty.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library with weak undefined function
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlopen_weak_undefined_func",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_weak_undefined.cpp"],
+}
+
+// -----------------------------------------------------------------------------
+// Library with constructor that calls dlopen() b/7941716
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlopen_from_ctor",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["dlopen_testlib_dlopen_from_ctor.cpp"],
+ target: {
+ android: {
+ shared_libs: ["libdl"],
+ },
+ },
+}
+
+// -----------------------------------------------------------------------------
+// Library that depends on the library with constructor that calls dlopen() b/7941716
+// -----------------------------------------------------------------------------
+cc_library {
+ name: "libtest_dlopen_from_ctor_main",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["empty.cpp"],
+ shared_libs: ["libtest_dlopen_from_ctor"],
+}
+
+// -----------------------------------------------------------------------------
+// Tool to use to align the shared libraries in a zip file.
+// -----------------------------------------------------------------------------
+cc_binary_host {
+ name: "bionic_tests_zipalign",
+ srcs: ["bionic_tests_zipalign.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ static_libs: [
+ "libziparchive",
+ "liblog",
+ "libbase",
+ "libz",
+ "libutils",
+ ],
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+}
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 82bfc05..aa70b86 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -33,34 +33,6 @@
$(TEST_PATH)/Android.build.mk
# -----------------------------------------------------------------------------
-# Library to test gnu-styled hash
-# -----------------------------------------------------------------------------
-ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
-libgnu-hash-table-library_src_files := \
- dlext_test_library.cpp \
-
-libgnu-hash-table-library_ldflags := \
- -Wl,--hash-style=gnu \
-
-module := libgnu-hash-table-library
-module_tag := optional
-include $(LOCAL_PATH)/Android.build.testlib.mk
-endif
-
-# -----------------------------------------------------------------------------
-# Library to test sysv-styled hash
-# -----------------------------------------------------------------------------
-libsysv-hash-table-library_src_files := \
- dlext_test_library.cpp \
-
-libsysv-hash-table-library_ldflags := \
- -Wl,--hash-style=sysv \
-
-module := libsysv-hash-table-library
-module_tag := optional
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
# Library used by dlext tests - with GNU RELRO program header
# -----------------------------------------------------------------------------
libdlext_test_src_files := \
@@ -96,23 +68,6 @@
$(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
# -----------------------------------------------------------------------------
-# Library used by dlext tests - without GNU RELRO program header
-# -----------------------------------------------------------------------------
-libdlext_test_norelro_src_files := \
- dlext_test_library.cpp \
-
-libdlext_test_norelro_ldflags := \
- -Wl,-z,norelro \
-
-libdlext_test_norelro_shared_libraries := libtest_simple
-
-module := libdlext_test_norelro
-module_tag := optional
-build_type := target
-build_target := SHARED_LIBRARY
-include $(TEST_PATH)/Android.build.mk
-
-# -----------------------------------------------------------------------------
# Library used by dlext tests - different name non-default location
# -----------------------------------------------------------------------------
libdlext_test_fd_src_files := \
@@ -176,44 +131,6 @@
endif
# -----------------------------------------------------------------------------
-# Library used by dlfcn tests
-# -----------------------------------------------------------------------------
-libtest_simple_src_files := \
- dlopen_testlib_simple.cpp
-
-module := libtest_simple
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library used by dlfcn nodelete tests
-# -----------------------------------------------------------------------------
-libtest_nodelete_1_src_files := \
- dlopen_nodelete_1.cpp
-
-module := libtest_nodelete_1
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library used by dlfcn nodelete tests
-# -----------------------------------------------------------------------------
-libtest_nodelete_2_src_files := \
- dlopen_nodelete_2.cpp
-
-module := libtest_nodelete_2
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library used by dlfcn nodelete tests
-# -----------------------------------------------------------------------------
-libtest_nodelete_dt_flags_1_src_files := \
- dlopen_nodelete_dt_flags_1.cpp
-
-libtest_nodelete_dt_flags_1_ldflags := -Wl,-z,nodelete
-
-module := libtest_nodelete_dt_flags_1
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
# Build test helper libraries for linker namespaces
# -----------------------------------------------------------------------------
include $(LOCAL_PATH)/Android.build.linker_namespaces.mk
@@ -254,82 +171,6 @@
include $(LOCAL_PATH)/Android.build.pthread_atfork.mk
# -----------------------------------------------------------------------------
-# Library with dependency loop used by dlfcn tests
-#
-# libtest_with_dependency_loop -> a -> b -> c -> a
-# -----------------------------------------------------------------------------
-libtest_with_dependency_loop_src_files := dlopen_testlib_loopy_root.cpp
-
-libtest_with_dependency_loop_shared_libraries := \
- libtest_with_dependency_loop_a
-
-module := libtest_with_dependency_loop
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# libtest_with_dependency_loop_a.so
-# -----------------------------------------------------------------------------
-libtest_with_dependency_loop_a_src_files := dlopen_testlib_loopy_a.cpp
-
-libtest_with_dependency_loop_a_shared_libraries := \
- libtest_with_dependency_loop_b_tmp
-
-module := libtest_with_dependency_loop_a
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# libtest_with_dependency_loop_b.so
-#
-# this is temporary placeholder - will be removed
-# -----------------------------------------------------------------------------
-libtest_with_dependency_loop_b_tmp_src_files := dlopen_testlib_loopy_invalid.cpp
-libtest_with_dependency_loop_b_tmp_ldflags := -Wl,-soname=libtest_with_dependency_loop_b.so
-
-module := libtest_with_dependency_loop_b_tmp
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# libtest_with_dependency_loop_b.so
-# -----------------------------------------------------------------------------
-libtest_with_dependency_loop_b_src_files := dlopen_testlib_loopy_b.cpp
-libtest_with_dependency_loop_b_shared_libraries := libtest_with_dependency_loop_c
-
-module := libtest_with_dependency_loop_b
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# libtest_with_dependency_loop_c.so
-# -----------------------------------------------------------------------------
-libtest_with_dependency_loop_c_src_files := dlopen_testlib_loopy_c.cpp
-
-libtest_with_dependency_loop_c_shared_libraries := \
- libtest_with_dependency_loop_a
-
-module := libtest_with_dependency_loop_c
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# libtest_relo_check_dt_needed_order.so
-# |
-# +-> libtest_relo_check_dt_needed_order_1.so
-# |
-# +-> libtest_relo_check_dt_needed_order_2.so
-# -----------------------------------------------------------------------------
-libtest_relo_check_dt_needed_order_shared_libraries := \
- libtest_relo_check_dt_needed_order_1 libtest_relo_check_dt_needed_order_2
-
-libtest_relo_check_dt_needed_order_src_files := dlopen_testlib_relo_check_dt_needed_order.cpp
-libtest_relo_check_dt_needed_order_1_src_files := dlopen_testlib_relo_check_dt_needed_order_1.cpp
-libtest_relo_check_dt_needed_order_2_src_files := dlopen_testlib_relo_check_dt_needed_order_2.cpp
-
-module := libtest_relo_check_dt_needed_order
-include $(LOCAL_PATH)/Android.build.testlib.mk
-module := libtest_relo_check_dt_needed_order_1
-include $(LOCAL_PATH)/Android.build.testlib.mk
-module := libtest_relo_check_dt_needed_order_2
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
# Library with dependency used by dlfcn tests
# -----------------------------------------------------------------------------
libtest_with_dependency_src_files := \
@@ -339,161 +180,3 @@
module := libtest_with_dependency
include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library used by ifunc tests
-# -----------------------------------------------------------------------------
-libtest_ifunc_src_files := \
- dlopen_testlib_ifunc.c
-
-# TODO(dimitry): clang does not support ifunc attribute
-libtest_ifunc_clang_host := false
-
-module := libtest_ifunc
-build_target := SHARED_LIBRARY
-
-build_type := host
-include $(TEST_PATH)/Android.build.mk
-
-ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64 x86 x86_64))
- build_type := target
- libtest_ifunc_clang_target := false
- include $(TEST_PATH)/Android.build.mk
-endif
-
-
-# -----------------------------------------------------------------------------
-# Library used by atexit tests
-# -----------------------------------------------------------------------------
-
-libtest_atexit_src_files := \
- atexit_testlib.cpp
-
-module := libtest_atexit
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# This library is used by dl_load test to check symbol preempting
-# by main executable
-# -----------------------------------------------------------------------------
-libdl_preempt_test_1_src_files := dl_preempt_library_1.cpp
-
-module := libdl_preempt_test_1
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# This library is used by dl_load test to check symbol preempting
-# by libdl_preempt_test_1.so
-# -----------------------------------------------------------------------------
-libdl_preempt_test_2_src_files := dl_preempt_library_2.cpp
-
-module := libdl_preempt_test_2
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library with DF_1_GLOBAL
-# -----------------------------------------------------------------------------
-libdl_test_df_1_global_src_files := dl_df_1_global.cpp
-libdl_test_df_1_global_ldflags := -Wl,-z,global
-
-# TODO (dimitry): host ld.gold does not yet support -z global
-# remove this line once it is updated.
-libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd
-
-module := libdl_test_df_1_global
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library using symbol from libdl_test_df_1_global
-# -----------------------------------------------------------------------------
-libtest_dlsym_df_1_global_src_files := dl_df_1_use_global.cpp
-module := libtest_dlsym_df_1_global
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library with weak function
-# -----------------------------------------------------------------------------
-libtest_dlsym_weak_func_src_files := \
- dlsym_weak_function.cpp
-
-module := libtest_dlsym_weak_func
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library to check RTLD_LOCAL with dlsym in 'this'
-# -----------------------------------------------------------------------------
-libtest_dlsym_from_this_src_files := dlsym_from_this_symbol.cpp
-
-libtest_dlsym_from_this_shared_libraries_target := libdl
-libtest_dlsym_from_this_shared_libraries := libtest_dlsym_from_this_child
-
-module := libtest_dlsym_from_this
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-libtest_dlsym_from_this_child_src_files := dlsym_from_this_functions.cpp
-
-libtest_dlsym_from_this_child_shared_libraries := libtest_dlsym_from_this_grandchild
-
-module := libtest_dlsym_from_this_child
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-libtest_dlsym_from_this_grandchild_src_files := dlsym_from_this_symbol2.cpp
-
-module := libtest_dlsym_from_this_grandchild
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Empty library
-# -----------------------------------------------------------------------------
-libtest_empty_src_files := empty.cpp
-
-module := libtest_empty
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library with weak undefined function
-# -----------------------------------------------------------------------------
-libtest_dlopen_weak_undefined_func_src_files := \
- dlopen_weak_undefined.cpp
-
-module := libtest_dlopen_weak_undefined_func
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library with constructor that calls dlopen() b/7941716
-# -----------------------------------------------------------------------------
-libtest_dlopen_from_ctor_src_files := \
- dlopen_testlib_dlopen_from_ctor.cpp
-
-module := libtest_dlopen_from_ctor
-
-libtest_dlopen_from_ctor_shared_libraries_target := libdl
-
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Library that depends on the library with constructor that calls dlopen() b/7941716
-# -----------------------------------------------------------------------------
-
-libtest_dlopen_from_ctor_main_src_files := empty.cpp
-libtest_dlopen_from_ctor_main_shared_libraries := libtest_dlopen_from_ctor
-
-module := libtest_dlopen_from_ctor_main
-include $(LOCAL_PATH)/Android.build.testlib.mk
-
-# -----------------------------------------------------------------------------
-# Tool to use to align the shared libraries in a zip file.
-# -----------------------------------------------------------------------------
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := bionic_tests_zipalign.cpp
-LOCAL_MODULE := bionic_tests_zipalign
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_STATIC_LIBRARIES := libziparchive-host liblog libbase libz libutils
-
-LOCAL_MODULE_HOST_OS := darwin linux windows
-
-include $(BUILD_HOST_EXECUTABLE)