Make bionic gtest main be compatible with gtest output format for cts test.
Bug: 17589740
Change-Id: Ifab521da379a33bf0a7bf11c21386f936f0d494c
diff --git a/tests/Android.mk b/tests/Android.mk
index bd4695f..b3eea06 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -211,7 +211,7 @@
include $(LOCAL_PATH)/Android.build.mk
# -----------------------------------------------------------------------------
-# Library of bionic customized gtest main function.
+# Library of bionic customized gtest main function, with simplified output format.
# -----------------------------------------------------------------------------
libBionicGtestMain_src_files := gtest_main.cpp
@@ -228,6 +228,24 @@
include $(LOCAL_PATH)/Android.build.mk
# -----------------------------------------------------------------------------
+# Library of bionic customized gtest main function, with normal gtest output format,
+# which is needed by bionic cts test.
+# -----------------------------------------------------------------------------
+libBionicCtsGtestMain_src_files := gtest_main.cpp
+
+libBionicCtsGtestMain_cflags := $(test_cflags)
+
+libBionicCtsGtestMain_cppflags := $(test_cppflags) -DUSING_GTEST_OUTPUT_FORMAT
+
+module := libBionicCtsGtestMain
+module_tag := optional
+build_type := target
+build_target := STATIC_TEST_LIBRARY
+include $(LOCAL_PATH)/Android.build.mk
+build_type := host
+include $(LOCAL_PATH)/Android.build.mk
+
+# -----------------------------------------------------------------------------
# Tests for the device using bionic's .so. Run with:
# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests32
# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests64