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
This commit is contained in:
Christopher Wiley
2015-09-01 12:39:25 -07:00
parent 722bf5c7de
commit 1006bfe09d
2 changed files with 8 additions and 1 deletions

View File

@@ -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)

6
tools/aidl/test_main.cpp Normal file
View File

@@ -0,0 +1,6 @@
#include <gtest/gtest.h>
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}