]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blobdiff - tests/Android.mk
Extract bionic-prepare-run-on-host to inc file.
[android-sdk/platform-bionic.git] / tests / Android.mk
index fec4cf672eb7fa07de1444e58275f7242daa26c2..93ab9bde620fd0ddafbd0a87d485d5c599fa3ce7 100644 (file)
@@ -54,6 +54,7 @@ test_cppflags = \
 libBionicStandardTests_src_files := \
     arpa_inet_test.cpp \
     buffer_tests.cpp \
+    complex_test.cpp \
     ctype_test.cpp \
     dirent_test.cpp \
     eventfd_test.cpp \
@@ -67,20 +68,6 @@ libBionicStandardTests_src_files := \
     libgen_test.cpp \
     locale_test.cpp \
     malloc_test.cpp \
-    math_cos_test.cpp \
-    math_cosf_test.cpp \
-    math_exp_test.cpp \
-    math_expf_test.cpp \
-    math_log_test.cpp \
-    math_logf_test.cpp \
-    math_pow_test.cpp \
-    math_powf_test.cpp \
-    math_sin_test.cpp \
-    math_sinf_test.cpp \
-    math_sincos_test.cpp \
-    math_sincosf_test.cpp \
-    math_tan_test.cpp \
-    math_tanf_test.cpp \
     math_test.cpp \
     mntent_test.cpp \
     netdb_test.cpp \
@@ -89,6 +76,7 @@ libBionicStandardTests_src_files := \
     sched_test.cpp \
     search_test.cpp \
     semaphore_test.cpp \
+    setjmp_test.cpp \
     signal_test.cpp \
     stack_protector_test.cpp \
     stack_unwinding_test.cpp \
@@ -111,6 +99,7 @@ libBionicStandardTests_src_files := \
     sys_stat_test.cpp \
     sys_statvfs_test.cpp \
     sys_syscall_test.cpp \
+    sys_sysinfo_test.cpp \
     sys_time_test.cpp \
     sys_types_test.cpp \
     sys_vfs_test.cpp \
@@ -314,9 +303,7 @@ bionic-unit-tests-glibc_shared_libraries := \
     libdl_preempt_test_1 \
     libdl_preempt_test_2
 
-ifneq ($(filter $(TARGET_ARCH),arm arm64),$(TARGET_ARCH))
 bionic-unit-tests-glibc_shared_libraries += libdl_test_df_1_global
-endif
 
 bionic-unit-tests-glibc_whole_static_libraries := \
     libBionicStandardTests \
@@ -331,6 +318,8 @@ bionic-unit-tests-glibc_cflags := $(test_cflags)
 bionic-unit-tests-glibc_cppflags := $(test_cppflags)
 bionic-unit-tests-glibc_ldflags := -Wl,--export-dynamic
 
+bionic-unit-tests-glibc_allow_asan := true
+
 module := bionic-unit-tests-glibc
 module_tag := optional
 build_type := host
@@ -384,14 +373,6 @@ include $(BUILD_STATIC_LIBRARY)
 # Host glibc tests.
 # -----------------------------------------------------------------------------
 
-ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
-LINKER = linker64
-NATIVE_TEST_SUFFIX=64
-else
-LINKER = linker
-NATIVE_TEST_SUFFIX=32
-endif
-
 # gtest needs ANDROID_DATA/local/tmp for death test output.
 # Make sure to create ANDROID_DATA/local/tmp if doesn't exist.
 # Use the current target out directory as ANDROID_DATA.
@@ -400,44 +381,32 @@ bionic-unit-tests-glibc-run: bionic-unit-tests-glibc
        mkdir -p $(TARGET_OUT_DATA)/local/tmp
        ANDROID_DATA=$(TARGET_OUT_DATA) \
        ANDROID_ROOT=$(TARGET_OUT) \
-               $(HOST_OUT_EXECUTABLES)/bionic-unit-tests-glibc$(NATIVE_TEST_SUFFIX) $(BIONIC_TEST_FLAGS)
+               $(HOST_OUT_EXECUTABLES)/bionic-unit-tests-glibc64 $(BIONIC_TEST_FLAGS)
 
 # -----------------------------------------------------------------------------
 # Run the unit tests built against x86 bionic on an x86 host.
 # -----------------------------------------------------------------------------
 
+include $(LOCAL_PATH)/../build/run-on-host.mk
+
 ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
-# gtest needs ANDROID_DATA/local/tmp for death test output.
-# Make sure to create ANDROID_DATA/local/tmp if doesn't exist.
-# bionic itself should always work relative to ANDROID_DATA or ANDROID_ROOT.
 # BIONIC_TEST_FLAGS is either empty or it comes from the user.
-bionic-unit-tests-run-on-host-prepare: $(TARGET_OUT_EXECUTABLES)/$(LINKER) $(TARGET_OUT_EXECUTABLES)/sh
-       if [ ! -d /system ]; then \
-         echo "Attempting to create /system"; \
-         sudo mkdir -p -m 0777 /system; \
-       fi
-       mkdir -p $(TARGET_OUT_DATA)/local/tmp
-       ln -fs `realpath $(TARGET_OUT)/bin` /system/
-       ln -fs `realpath $(TARGET_OUT)/etc` /system/
-
-bionic-unit-tests-run-on-host: bionic-unit-tests bionic-unit-tests-run-on-host-prepare
+bionic-unit-tests-run-on-host32: bionic-unit-tests bionic-prepare-run-on-host
        ANDROID_DATA=$(TARGET_OUT_DATA) \
        ANDROID_DNS_MODE=local \
        ANDROID_ROOT=$(TARGET_OUT) \
-       LD_LIBRARY_PATH=$(TARGET_OUT_SHARED_LIBRARIES) \
-               $(TARGET_OUT_DATA_NATIVE_TESTS)/bionic-unit-tests/bionic-unit-tests$(NATIVE_TEST_SUFFIX) $(BIONIC_TEST_FLAGS)
-endif
+               $(TARGET_OUT_DATA)/nativetest/bionic-unit-tests/bionic-unit-tests32 $(BIONIC_TEST_FLAGS)
 
-ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64))
-# add target to run lp32 tests
-bionic-unit-tests-run-on-host32: bionic-unit-tests_32 bionic-unit-tests-run-on-host-prepare
+ifeq ($(TARGET_IS_64_BIT),true)
+# add target to run lp64 tests
+bionic-unit-tests-run-on-host64: bionic-unit-tests bionic-prepare-run-on-host
        ANDROID_DATA=$(TARGET_OUT_DATA) \
        ANDROID_DNS_MODE=local \
        ANDROID_ROOT=$(TARGET_OUT) \
-       LD_LIBRARY_PATH=$(2ND_TARGET_OUT_SHARED_LIBRARIES) \
-               $(2ND_TARGET_OUT_DATA_NATIVE_TESTS)/bionic-unit-tests/bionic-unit-tests32 $(BIONIC_TEST_FLAGS)
+               $(TARGET_OUT_DATA)/nativetest64/bionic-unit-tests/bionic-unit-tests64 $(BIONIC_TEST_FLAGS)
 endif
 
+endif # x86 x86_64
 endif # linux-x86
 
 include $(call first-makefiles-under,$(LOCAL_PATH))