merge in KQS81M
diff --git a/libc/zoneinfo/tzdata b/libc/zoneinfo/tzdata
index bce6e50..4d511d5 100644
--- a/libc/zoneinfo/tzdata
+++ b/libc/zoneinfo/tzdata
Binary files differ
diff --git a/tests/Android.mk b/tests/Android.mk
index 902bf69..534aa30 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -122,14 +122,37 @@
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_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc bionic-unit-tests-unwind-test-impl
-LOCAL_WHOLE_STATIC_LIBRARIES := $(test_fortify_static_libraries)
+LOCAL_WHOLE_STATIC_LIBRARIES += libBionicTests
+LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc
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) \
+ bionic-unit-tests-unwind-test-impl \
+
+include $(BUILD_STATIC_LIBRARY)
+
+# -----------------------------------------------------------------------------
# Test library for the unit tests.
# -----------------------------------------------------------------------------
diff --git a/tests/property_benchmark.cpp b/tests/property_benchmark.cpp
index d10be91..4311a1d 100644
--- a/tests/property_benchmark.cpp
+++ b/tests/property_benchmark.cpp
@@ -32,10 +32,10 @@
LocalPropertyTestState(int nprops) : nprops(nprops), valid(false) {
static const char prop_name_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_";
- char dir_template[] = "/data/nativetest/prop-XXXXXX";
+ char dir_template[] = "/data/local/tmp/prop-XXXXXX";
char *dirname = mkdtemp(dir_template);
if (!dirname) {
- perror("making temp file for test state failed (is /data/nativetest writable?)");
+ perror("making temp file for test state failed (is /data/local/tmp writable?)");
return;
}
diff --git a/tests/statvfs_test.cpp b/tests/statvfs_test.cpp
index 8afc6fd..31ce66a 100644
--- a/tests/statvfs_test.cpp
+++ b/tests/statvfs_test.cpp
@@ -35,7 +35,7 @@
#endif
#if __BIONIC__
- ASSERT_EQ(0, statvfs("/data/data", &sb));
+ ASSERT_EQ(0, statvfs("/data/local/tmp", &sb));
ASSERT_NE(0U, sb.f_bfree);
ASSERT_NE(0U, sb.f_ffree);
ASSERT_NE(0U, sb.f_fsid);
@@ -59,7 +59,7 @@
#endif
#if __BIONIC__
- fd = open("/data/data", O_RDONLY);
+ fd = open("/data/local/tmp", O_RDONLY);
ASSERT_EQ(0, fstatvfs(fd, &sb));
close(fd);
ASSERT_NE(0U, sb.f_bfree);
diff --git a/tests/system_properties_test.cpp b/tests/system_properties_test.cpp
index b9256c6..0a8cfa5 100644
--- a/tests/system_properties_test.cpp
+++ b/tests/system_properties_test.cpp
@@ -28,10 +28,10 @@
struct LocalPropertyTestState {
LocalPropertyTestState() : valid(false) {
- char dir_template[] = "/data/nativetest/prop-XXXXXX";
+ char dir_template[] = "/data/local/tmp/prop-XXXXXX";
char *dirname = mkdtemp(dir_template);
if (!dirname) {
- perror("making temp file for test state failed (is /data/nativetest writable?)");
+ perror("making temp file for test state failed (is /data/local/tmp writable?)");
return;
}