Fix gunit test build.
Change-Id: I409e75202cc6af0b0a48b81602f2ac322da7f404
diff --git a/unit-tests/Android.mk b/unit-tests/Android.mk
index e32e890..e9b8a74 100644
--- a/unit-tests/Android.mk
+++ b/unit-tests/Android.mk
@@ -21,11 +21,16 @@
test_src_files = \
dvmHumanReadableDescriptor_test.cpp \
-
+
+test_c_includes = \
+ dalvik \
+ dalvik/vm \
# Build for the device. Run with:
# adb shell /data/nativetest/dalvik-vm-unit-tests/dalvik-vm-unit-tests
include $(CLEAR_VARS)
+LOCAL_CFLAGS += -DANDROID_SMP=1
+LOCAL_C_INCLUDES += $(test_c_includes)
LOCAL_MODULE := $(test_module)
LOCAL_MODULE_TAGS := $(test_tags)
LOCAL_SRC_FILES := $(test_src_files)
@@ -36,6 +41,7 @@
# TODO: BUILD_HOST_NATIVE_TEST doesn't work yet; STL-related compile-time and
# run-time failures, presumably astl/stlport/genuine host STL confusion.
#include $(CLEAR_VARS)
+#LOCAL_C_INCLUDES += $(test_c_includes)
#LOCAL_MODULE := $(test_module)
#LOCAL_MODULE_TAGS := $(test_tags)
#LOCAL_SRC_FILES := $(test_src_files)
diff --git a/unit-tests/dvmHumanReadableDescriptor_test.cpp b/unit-tests/dvmHumanReadableDescriptor_test.cpp
index 9f1bdf6..89ca85c 100644
--- a/unit-tests/dvmHumanReadableDescriptor_test.cpp
+++ b/unit-tests/dvmHumanReadableDescriptor_test.cpp
@@ -1,5 +1,7 @@
#include <gtest/gtest.h>
+#include "Dalvik.h"
+
TEST(dvmHumanReadableDescriptor, ArrayReferences) {
ASSERT_EQ("java.lang.Class[]", dvmHumanReadableDescriptor("[Ljava/lang/Class;"));
ASSERT_EQ("java.lang.Class[][]", dvmHumanReadableDescriptor("[[Ljava/lang/Class;"));