summaryrefslogtreecommitdiff
path: root/tools/aidl
diff options
context:
space:
mode:
authorCasey Dahlin <sadmac@google.com>2015-08-28 15:46:48 -0700
committerCasey Dahlin <sadmac@google.com>2015-08-28 16:21:53 -0700
commit8a8775c1db7012500ea94405e481f07f1ee7e645 (patch)
tree907be49256d419a4677feb81952ddc7b459cf1ea /tools/aidl
parentea288fd3d4272cc6cd5da94b942fc4cfdc76e030 (diff)
Set up aidl for gtest
Bug: 23516947 Change-Id: I1c004868525f462d04894a7b96c671b626061ab5 Signed-off-by: Casey Dahlin <sadmac@google.com>
Diffstat (limited to 'tools/aidl')
-rw-r--r--tools/aidl/Android.mk9
-rw-r--r--tools/aidl/tests/test.cpp3
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/aidl/Android.mk b/tools/aidl/Android.mk
index efd60a2cda99..c76a04e908f8 100644
--- a/tools/aidl/Android.mk
+++ b/tools/aidl/Android.mk
@@ -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
index 000000000000..15ae294138a8
--- /dev/null
+++ b/tools/aidl/tests/test.cpp
@@ -0,0 +1,3 @@
+#include <gtest/gtest.h>
+
+TEST(DummyCase, DummyTest) {}