blob: 58230f429ed09ca6774699859c02cbd927783e51 [file] [log] [blame]
Jeff Browne839a582010-04-22 18:58:52 -07001# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Browna50ee3e2010-07-14 22:40:08 -07005# Build the unit tests.
Jeff Browne839a582010-04-22 18:58:52 -07006test_src_files := \
Jeff Brown66fbde32011-11-14 18:29:15 -08007 BasicHashtable_test.cpp \
Jamie Gennis58c8dd22011-04-28 16:19:45 -07008 BlobCache_test.cpp \
Jeff Brown59abe7e2010-09-13 23:17:30 -07009 Looper_test.cpp \
Jeff Brown66fbde32011-11-14 18:29:15 -080010 ObbFile_test.cpp \
Kenny Rootc412dcb2010-11-09 14:37:23 -080011 String8_test.cpp \
Kenny Root49a65e52011-07-12 14:14:01 -070012 Unicode_test.cpp \
13 ZipFileRO_test.cpp \
Jeff Browne839a582010-04-22 18:58:52 -070014
Jeff Brownf69280e2010-06-14 15:44:41 -070015shared_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070016 libz \
17 liblog \
18 libcutils \
19 libutils \
20 libstlport
21
Jeff Brownf69280e2010-06-14 15:44:41 -070022static_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070023 libgtest \
24 libgtest_main
25
Jeff Brownf69280e2010-06-14 15:44:41 -070026c_includes := \
Jeff Browne839a582010-04-22 18:58:52 -070027 external/zlib \
28 external/icu4c/common \
29 bionic \
30 bionic/libstdc++/include \
31 external/gtest/include \
32 external/stlport/stlport
33
Jeff Brownf69280e2010-06-14 15:44:41 -070034module_tags := eng tests
Jeff Browne839a582010-04-22 18:58:52 -070035
36$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070037 $(eval include $(CLEAR_VARS)) \
38 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
39 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
40 $(eval LOCAL_C_INCLUDES := $(c_includes)) \
Jeff Browne839a582010-04-22 18:58:52 -070041 $(eval LOCAL_SRC_FILES := $(file)) \
42 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf69280e2010-06-14 15:44:41 -070043 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Browne839a582010-04-22 18:58:52 -070044 $(eval include $(BUILD_EXECUTABLE)) \
45)