blob: b97f52f5b89277cc9698710d3fe98ad771531f92 [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 := \
Jamie Gennis58c8dd22011-04-28 16:19:45 -07007 BlobCache_test.cpp \
Kenny Rootb94a9a62010-06-01 10:34:29 -07008 ObbFile_test.cpp \
Jeff Brown59abe7e2010-09-13 23:17:30 -07009 Looper_test.cpp \
Kenny Rootc412dcb2010-11-09 14:37:23 -080010 String8_test.cpp \
Kenny Root49a65e52011-07-12 14:14:01 -070011 Unicode_test.cpp \
12 ZipFileRO_test.cpp \
Jeff Browne839a582010-04-22 18:58:52 -070013
Jeff Brownf69280e2010-06-14 15:44:41 -070014shared_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070015 libz \
16 liblog \
17 libcutils \
18 libutils \
19 libstlport
20
Jeff Brownf69280e2010-06-14 15:44:41 -070021static_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070022 libgtest \
23 libgtest_main
24
Jeff Brownf69280e2010-06-14 15:44:41 -070025c_includes := \
Jeff Browne839a582010-04-22 18:58:52 -070026 external/zlib \
27 external/icu4c/common \
28 bionic \
29 bionic/libstdc++/include \
30 external/gtest/include \
31 external/stlport/stlport
32
Jeff Brownf69280e2010-06-14 15:44:41 -070033module_tags := eng tests
Jeff Browne839a582010-04-22 18:58:52 -070034
35$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070036 $(eval include $(CLEAR_VARS)) \
37 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
38 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
39 $(eval LOCAL_C_INCLUDES := $(c_includes)) \
Jeff Browne839a582010-04-22 18:58:52 -070040 $(eval LOCAL_SRC_FILES := $(file)) \
41 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf69280e2010-06-14 15:44:41 -070042 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Browne839a582010-04-22 18:58:52 -070043 $(eval include $(BUILD_EXECUTABLE)) \
44)