Move libraries for unit-tests to separate folder
Change-Id: I1653f3f2fd63ba25525369bc725c8f7438ecf021
This commit is contained in:
parent
b656410a73
commit
1f5e1a3cbc
@ -36,10 +36,6 @@ LOCAL_CLANG := $($(module)_clang_$(build_type))
|
|||||||
|
|
||||||
LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable)
|
LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable)
|
||||||
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := \
|
|
||||||
$(LOCAL_PATH)/Android.mk \
|
|
||||||
$(LOCAL_PATH)/Android.build.mk \
|
|
||||||
|
|
||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
$(common_cflags) \
|
$(common_cflags) \
|
||||||
$($(module)_cflags) \
|
$($(module)_cflags) \
|
||||||
|
@ -232,88 +232,6 @@ include $(LOCAL_PATH)/Android.build.mk
|
|||||||
build_type := host
|
build_type := host
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
include $(LOCAL_PATH)/Android.build.mk
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Library used by dlfcn tests.
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
|
|
||||||
no-elf-hash-table-library_src_files := \
|
|
||||||
empty.cpp \
|
|
||||||
|
|
||||||
no-elf-hash-table-library_ldflags := \
|
|
||||||
-Wl,--hash-style=gnu \
|
|
||||||
|
|
||||||
module := no-elf-hash-table-library
|
|
||||||
module_tag := optional
|
|
||||||
build_type := target
|
|
||||||
build_target := SHARED_LIBRARY
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Library used by dlext tests - with/without GNU RELRO program header
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
libdlext_test_src_files := \
|
|
||||||
dlext_test_library.cpp \
|
|
||||||
|
|
||||||
libdlext_test_ldflags := \
|
|
||||||
-Wl,-z,relro \
|
|
||||||
|
|
||||||
module := libdlext_test
|
|
||||||
module_tag := optional
|
|
||||||
build_type := target
|
|
||||||
build_target := SHARED_LIBRARY
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# create symlink to libdlext_test.so for symlink test
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Use = instead of := to defer the evaluation of $@
|
|
||||||
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \
|
|
||||||
$(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
|
|
||||||
ifneq ($(TARGET_2ND_ARCH),)
|
|
||||||
# link 64 bit .so
|
|
||||||
$(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \
|
|
||||||
$(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
|
|
||||||
endif
|
|
||||||
|
|
||||||
libdlext_test_norelro_src_files := \
|
|
||||||
dlext_test_library.cpp \
|
|
||||||
|
|
||||||
libdlext_test_norelro_ldflags := \
|
|
||||||
-Wl,-z,norelro \
|
|
||||||
|
|
||||||
module := libdlext_test_norelro
|
|
||||||
module_tag := optional
|
|
||||||
build_type := target
|
|
||||||
build_target := SHARED_LIBRARY
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Library used by dlfcn tests
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
libtest_simple_src_files := \
|
|
||||||
dlopen_testlib_simple.cpp
|
|
||||||
|
|
||||||
module := libtest_simple
|
|
||||||
build_type := target
|
|
||||||
build_target := SHARED_LIBRARY
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Library used by atexit tests
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
libtest_atexit_src_files := \
|
|
||||||
atexit_testlib.cpp
|
|
||||||
|
|
||||||
module := libtest_atexit
|
|
||||||
build_target := SHARED_LIBRARY
|
|
||||||
build_type := target
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
build_type := host
|
|
||||||
include $(LOCAL_PATH)/Android.build.mk
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Tests for the device using bionic's .so. Run with:
|
# Tests for the device using bionic's .so. Run with:
|
||||||
# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
|
# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
|
||||||
@ -438,4 +356,5 @@ endif
|
|||||||
|
|
||||||
endif # linux-x86
|
endif # linux-x86
|
||||||
|
|
||||||
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|
||||||
endif # !BUILD_TINY_ANDROID
|
endif # !BUILD_TINY_ANDROID
|
||||||
|
105
tests/libs/Android.mk
Normal file
105
tests/libs/Android.mk
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
TEST_PATH := $(LOCAL_PATH)/..
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Library used by dlfcn tests.
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
|
||||||
|
no-elf-hash-table-library_src_files := \
|
||||||
|
empty.cpp \
|
||||||
|
|
||||||
|
no-elf-hash-table-library_ldflags := \
|
||||||
|
-Wl,--hash-style=gnu \
|
||||||
|
|
||||||
|
module := no-elf-hash-table-library
|
||||||
|
module_tag := optional
|
||||||
|
build_type := target
|
||||||
|
build_target := SHARED_LIBRARY
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Library used by dlext tests - with GNU RELRO program header
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
libdlext_test_src_files := \
|
||||||
|
dlext_test_library.cpp \
|
||||||
|
|
||||||
|
libdlext_test_ldflags := \
|
||||||
|
-Wl,-z,relro \
|
||||||
|
|
||||||
|
module := libdlext_test
|
||||||
|
module_tag := optional
|
||||||
|
build_type := target
|
||||||
|
build_target := SHARED_LIBRARY
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# create symlink to libdlext_test.so for symlink test
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Use = instead of := to defer the evaluation of $@
|
||||||
|
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \
|
||||||
|
$(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
|
||||||
|
|
||||||
|
ifneq ($(TARGET_2ND_ARCH),)
|
||||||
|
# link 64 bit .so
|
||||||
|
$(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \
|
||||||
|
$(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
|
||||||
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# 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 \
|
||||||
|
|
||||||
|
module := libdlext_test_norelro
|
||||||
|
module_tag := optional
|
||||||
|
build_type := target
|
||||||
|
build_target := SHARED_LIBRARY
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Library used by dlfcn tests
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
libtest_simple_src_files := \
|
||||||
|
dlopen_testlib_simple.cpp
|
||||||
|
|
||||||
|
module := libtest_simple
|
||||||
|
build_type := target
|
||||||
|
build_target := SHARED_LIBRARY
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Library used by atexit tests
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
libtest_atexit_src_files := \
|
||||||
|
atexit_testlib.cpp
|
||||||
|
|
||||||
|
module := libtest_atexit
|
||||||
|
build_target := SHARED_LIBRARY
|
||||||
|
build_type := target
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
build_type := host
|
||||||
|
include $(TEST_PATH)/Android.build.mk
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user