Move CTS to libc++.
Change-Id: If9c78c887919109ebaab634ec13a678b62891a90
diff --git a/apps/CtsVerifier/jni/cameraanalyzer/Android.mk b/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
index e7707f2..d595a20 100644
--- a/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
+++ b/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
@@ -16,6 +16,7 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := libcameraanalyzer
@@ -30,7 +31,7 @@
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../include/colorchecker $(JNI_H_INCLUDE)
-LOCAL_CXX_STL := stlport
+LOCAL_CXX_STL := libc++
LOCAL_STATIC_LIBRARIES := libcolorchecker
LOCAL_SHARED_LIBRARIES := \
libjnigraphics \
diff --git a/apps/CtsVerifier/lib/colorchecker/Android.mk b/apps/CtsVerifier/lib/colorchecker/Android.mk
index c488050..48f1356 100644
--- a/apps/CtsVerifier/lib/colorchecker/Android.mk
+++ b/apps/CtsVerifier/lib/colorchecker/Android.mk
@@ -19,6 +19,7 @@
# Build image analysis library
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libcolorchecker
@@ -34,7 +35,7 @@
whitebalancetest.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../include/colorchecker
-LOCAL_CXX_STL := stlport
+LOCAL_CXX_STL := libc++
LOCAL_SHARED_LIBRARIES := \
libcutils \
libutils \
diff --git a/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp b/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
index 46b8cc8..ef7d2c6 100644
--- a/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
+++ b/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
@@ -549,10 +549,10 @@
(pointBottomRight.x() >= mImage->getHeight()) ||
(pointBottomRight.y() < 0) ||
(pointBottomRight.y() >= mImage->getWidth()) ||
- (abs(pointUpperLeft.x() - pointBottomRight.x()) <= 5) ||
- (abs(pointUpperLeft.y() - pointBottomRight.y()) <= 5) ||
- (abs(pointUpperLeft.x() - pointBottomRight.x()) >= 30) ||
- (abs(pointUpperLeft.y() - pointBottomRight.y()) >= 30)) {
+ (std::abs(pointUpperLeft.x() - pointBottomRight.x()) <= 5) ||
+ (std::abs(pointUpperLeft.y() - pointBottomRight.y()) <= 5) ||
+ (std::abs(pointUpperLeft.x() - pointBottomRight.x()) >= 30) ||
+ (std::abs(pointUpperLeft.y() - pointBottomRight.y()) >= 30)) {
// If any of the quadrilateral corners are out of the image or if
// the distance between them are too large or too big, the quadrilateral
diff --git a/build/test_executable.mk b/build/test_executable.mk
index b821d34..fc447ab 100644
--- a/build/test_executable.mk
+++ b/build/test_executable.mk
@@ -23,12 +23,7 @@
# as needed by CTS.
#
-ifneq ($(filter $(LOCAL_CXX_STL),libc++ libc++_static),)
LOCAL_CXX_STL := libc++
-else
-LOCAL_CXX_STL := stlport
-endif
-
include $(BUILD_EXECUTABLE)
cts_executable_xml := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).xml
diff --git a/suite/cts/deviceTests/opengl/test/Android.mk b/suite/cts/deviceTests/opengl/test/Android.mk
index a4abe4f..13779f1 100644
--- a/suite/cts/deviceTests/opengl/test/Android.mk
+++ b/suite/cts/deviceTests/opengl/test/Android.mk
@@ -18,6 +18,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(patsubst ./%,%, $(shell cd $(LOCAL_PATH); \
@@ -26,9 +27,10 @@
#$(info $(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES += external/gtest/include $(LOCAL_PATH)/../jni/graphics/
-LOCAL_STATIC_LIBRARIES := libutils libcutils libgtest_host libgtest_main_host liblog
-LOCAL_LDFLAGS:= -g -lrt -ldl -lstdc++ -lm -fno-exceptions -lpthread
+LOCAL_STATIC_LIBRARIES := libgtest_libc++_host libgtest_main_libc++_host liblog
+LOCAL_LDFLAGS:= -g -lpthread
LOCAL_MODULE:= cts_device_opengl_test
+LOCAL_CXX_STL := libc++
include $(BUILD_HOST_EXECUTABLE)
endif # linux
diff --git a/tests/tests/bionic/Android.mk b/tests/tests/bionic/Android.mk
index fe56b05..180e38e 100644
--- a/tests/tests/bionic/Android.mk
+++ b/tests/tests/bionic/Android.mk
@@ -22,8 +22,6 @@
libgtest_libc++ \
libgtest_main_libc++ \
-LOCAL_CXX_STL := libc++
-
LOCAL_CTS_TEST_PACKAGE := android.bionic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/tests/tests/nativemedia/sl/Android.mk b/tests/tests/nativemedia/sl/Android.mk
index 178b91d..06016f7 100644
--- a/tests/tests/nativemedia/sl/Android.mk
+++ b/tests/tests/nativemedia/sl/Android.mk
@@ -27,9 +27,8 @@
LOCAL_STATIC_LIBRARIES := \
libOpenSLESUT \
- libgtest
+ libgtest_libc++
-LOCAL_CXX_STL := stlport
LOCAL_CTS_TEST_PACKAGE := android.nativemedia.sl
include $(BUILD_CTS_EXECUTABLE)
diff --git a/tests/tests/nativemedia/xa/Android.mk b/tests/tests/nativemedia/xa/Android.mk
index baf97a6..c0dd7ce 100644
--- a/tests/tests/nativemedia/xa/Android.mk
+++ b/tests/tests/nativemedia/xa/Android.mk
@@ -26,7 +26,7 @@
libOpenMAXAL \
LOCAL_STATIC_LIBRARIES := \
- libgtest \
+ libgtest_libc++ \
LOCAL_CTS_TEST_PACKAGE := android.nativemedia.xa
include $(BUILD_CTS_EXECUTABLE)
diff --git a/tests/tests/nativeopengl/libnativeopengltests/Android.mk b/tests/tests/nativeopengl/libnativeopengltests/Android.mk
index 6b26e70..8503d76 100644
--- a/tests/tests/nativeopengl/libnativeopengltests/Android.mk
+++ b/tests/tests/nativeopengl/libnativeopengltests/Android.mk
@@ -16,10 +16,11 @@
# This is the shared library included by the JNI test app.
#
-LOCAL_PATH:= $(call my-dir)/../standalone/jni/
+LOCAL_PATH := $(call my-dir)/../standalone/jni/
+REAL_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_ADDITIONAL_DEPENDENCIES := $(REAL_LOCAL_PATH)/Android.mk
LOCAL_MODULE := libnativeopengltests
@@ -36,12 +37,12 @@
tests/EGLCleanup_test.cpp \
tests/EGLCreateContext_test.cpp
-LOCAL_CXX_STL := stlport
+LOCAL_CXX_STL := libc++
LOCAL_SHARED_LIBRARIES := libEGL \
libGLESv2 \
libandroid \
liblog \
-LOCAL_STATIC_LIBRARIES := libgtest
+LOCAL_STATIC_LIBRARIES := libgtest_libc++
include $(BUILD_SHARED_LIBRARY)