OSDN Git Service

Set up aidl for gtest
authorCasey Dahlin <sadmac@google.com>
Fri, 28 Aug 2015 22:46:48 +0000 (15:46 -0700)
committerCasey Dahlin <sadmac@google.com>
Fri, 28 Aug 2015 23:21:53 +0000 (16:21 -0700)
Bug: 23516947

Change-Id: I1c004868525f462d04894a7b96c671b626061ab5
Signed-off-by: Casey Dahlin <sadmac@google.com>
tools/aidl/Android.mk
tools/aidl/tests/test.cpp [new file with mode: 0644]

index efd60a2..c76a04e 100644 (file)
@@ -26,4 +26,13 @@ LOCAL_MODULE := aidl
 
 include $(BUILD_HOST_EXECUTABLE)
 
+# Unit tests
+include $(CLEAR_VARS)
+LOCAL_MODULE := aidl_unittests
+LOCAL_CFLAGS := -g -DUNIT_TEST
+LOCAL_SRC_FILES := tests/test.cpp
+LOCAL_STATIC_LIBRARIES := libgmock_host libgtest_host libBionicGtestMain
+LOCAL_LDLIBS := -lrt
+include $(BUILD_HOST_NATIVE_TEST)
+
 endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK
diff --git a/tools/aidl/tests/test.cpp b/tools/aidl/tests/test.cpp
new file mode 100644 (file)
index 0000000..15ae294
--- /dev/null
@@ -0,0 +1,3 @@
+#include <gtest/gtest.h>
+
+TEST(DummyCase, DummyTest) {}