From 1006bfe09ddeeca08fe7105382959d97abc89948 Mon Sep 17 00:00:00 2001 From: Christopher Wiley Date: Tue, 1 Sep 2015 12:39:25 -0700 Subject: [PATCH] aidl: Stop using Bionic's test main This allows us to build unittests on Mac, where Bionic's test main does not build. Change-Id: I59c805d233498bb67575f2e5f7049341f70ce55c --- tools/aidl/Android.mk | 3 ++- tools/aidl/test_main.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tools/aidl/test_main.cpp diff --git a/tools/aidl/Android.mk b/tools/aidl/Android.mk index b478a4dae9e5..354563ae48bc 100644 --- a/tools/aidl/Android.mk +++ b/tools/aidl/Android.mk @@ -56,13 +56,14 @@ LOCAL_MODULE := aidl_unittests LOCAL_CFLAGS := -g -DUNIT_TEST -Wall -Werror LOCAL_SRC_FILES := \ options_unittest.cpp \ + test_main.cpp \ tests/test.cpp \ LOCAL_STATIC_LIBRARIES := \ libaidl-common \ libgmock_host \ libgtest_host \ - libBionicGtestMain + LOCAL_LDLIBS := -lrt include $(BUILD_HOST_NATIVE_TEST) diff --git a/tools/aidl/test_main.cpp b/tools/aidl/test_main.cpp new file mode 100644 index 000000000000..4d820af774e1 --- /dev/null +++ b/tools/aidl/test_main.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} -- 2.11.0