aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2013-08-27 14:32:15 -0700
committerChristopher Ferris <cferris@google.com>2013-08-27 14:35:56 -0700
commit153d92765bb693541abf49a2a1d31335e2c90348 (patch)
treeb94f0d824c81b6716a5d896c126f7b865b7f796d
parent33dd7c116d652223b5bf3dabe49641c310d1216b (diff)
downloadbionic-153d92765bb693541abf49a2a1d31335e2c90348.tar.gz
Create bionic unit test library for use with CTS.
Bug: 8291716 Change-Id: I46b749348456fae7892eecca6b44aef51a0e4747
-rw-r--r--tests/Android.mk19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index 902bf6959..400d97923 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -122,14 +122,27 @@ include $(BUILD_NATIVE_TEST)
include $(CLEAR_VARS)
LOCAL_MODULE := bionic-unit-tests-static
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_CFLAGS += $(test_c_flags)
LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_SRC_FILES := $(test_src_files)
+LOCAL_WHOLE_STATIC_LIBRARIES += libBionicTests
LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc bionic-unit-tests-unwind-test-impl
-LOCAL_WHOLE_STATIC_LIBRARIES := $(test_fortify_static_libraries)
include $(BUILD_NATIVE_TEST)
# -----------------------------------------------------------------------------
+# We build the static unit tests as a library so they can be used both for
+# bionic-unit-tests-static and also as part of CTS.
+# -----------------------------------------------------------------------------
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libBionicTests
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_CFLAGS += $(test_c_flags)
+LOCAL_SRC_FILES := $(test_src_files)
+LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING
+LOCAL_C_INCLUDES += bionic bionic/libstdc++/include external/gtest/include external/stlport/stlport
+LOCAL_WHOLE_STATIC_LIBRARIES := $(test_fortify_static_libraries)
+include $(BUILD_STATIC_LIBRARY)
+
+# -----------------------------------------------------------------------------
# Test library for the unit tests.
# -----------------------------------------------------------------------------