]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blobdiff - tests/Android.mk
Merge "bionic: move benchmarks out of tests directory"
[android-sdk/platform-bionic.git] / tests / Android.mk
index 5bcf996c494b9fd283e8096d5834bd19195132e4..b5398f1529f0c0fd92511f87e32de630358f7b75 100644 (file)
@@ -18,34 +18,6 @@ ifneq ($(BUILD_TINY_ANDROID), true)
 
 LOCAL_PATH := $(call my-dir)
 
-# -----------------------------------------------------------------------------
-# Benchmarks.
-# -----------------------------------------------------------------------------
-
-benchmark_c_flags = \
-    -O2 \
-    -Wall -Wextra \
-    -Werror \
-    -fno-builtin \
-
-benchmark_src_files = \
-    benchmark_main.cpp \
-    math_benchmark.cpp \
-    property_benchmark.cpp \
-    string_benchmark.cpp \
-    time_benchmark.cpp \
-
-# Build benchmarks for the device (with bionic's .so). Run with:
-#   adb shell bionic-benchmarks
-include $(CLEAR_VARS)
-LOCAL_MODULE := bionic-benchmarks
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_CFLAGS += $(benchmark_c_flags)
-LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
-LOCAL_SHARED_LIBRARIES += libstlport
-LOCAL_SRC_FILES := $(benchmark_src_files)
-include $(BUILD_EXECUTABLE)
-
 # -----------------------------------------------------------------------------
 # Unit tests.
 # -----------------------------------------------------------------------------
@@ -58,8 +30,10 @@ test_c_flags = \
     -fno-builtin \
 
 test_src_files = \
+    buffer_tests.cpp \
     dirent_test.cpp \
     eventfd_test.cpp \
+    fcntl_test.cpp \
     fenv_test.cpp \
     getauxval_test.cpp \
     getcwd_test.cpp \
@@ -81,9 +55,11 @@ test_src_files = \
     string_test.cpp \
     strings_test.cpp \
     stubs_test.cpp \
+    sys_epoll_test.cpp \
     sys_select_test.cpp \
     sys_sendfile_test.cpp \
     sys_stat_test.cpp \
+    sys_syscall_test.cpp \
     sys_time_test.cpp \
     system_properties_test.cpp \
     time_test.cpp \
@@ -189,6 +165,15 @@ LOCAL_LDFLAGS += $(test_dynamic_ldflags)
 LOCAL_SRC_FILES := $(test_src_files) $(test_dynamic_src_files)
 LOCAL_STATIC_LIBRARIES += bionic-unit-tests-unwind-test-impl-host
 include $(BUILD_HOST_NATIVE_TEST)
+
+# 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.
+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
 endif
 
 # -----------------------------------------------------------------------------
@@ -202,17 +187,19 @@ LINKER = linker
 else
 LINKER = linker64
 endif
-# gtest needs EXTERNAL_STORAGE for death test output.
+# 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.
-# We create /data/local/tmp to be as much like the regular target environment
-# as possible.
 bionic-unit-tests-run-on-host: bionic-unit-tests $(TARGET_OUT_EXECUTABLES)/$(LINKER) $(TARGET_OUT_EXECUTABLES)/sh
+       if [ ! -d /system -o ! -d /system/bin ]; then \
+         echo "Attempting to create /system/bin"; \
+         sudo mkdir -p -m 0777 /system/bin; \
+       fi
        mkdir -p $(TARGET_OUT_DATA)/local/tmp
        cp $(TARGET_OUT_EXECUTABLES)/$(LINKER) /system/bin
        cp $(TARGET_OUT_EXECUTABLES)/sh /system/bin
        ANDROID_DATA=$(TARGET_OUT_DATA) \
        ANDROID_ROOT=$(TARGET_OUT) \
-       EXTERNAL_STORAGE=$(TARGET_OUT_DATA)/local/tmp \
        LD_LIBRARY_PATH=$(TARGET_OUT_SHARED_LIBRARIES) \
                $(TARGET_OUT_DATA_NATIVE_TESTS)/bionic-unit-tests/bionic-unit-tests
 endif