blob: a2ca9c8771bb652046b7d53c520d56d042bb997e [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 := \
Kenny Rooted22c1c2012-10-02 09:09:10 -07007 BasicHashtable_test.cpp \
8 BlobCache_test.cpp \
9 Looper_test.cpp \
Raph Levien8185e472012-10-25 23:11:13 -070010 LruCache_test.cpp \
Kenny Rooted22c1c2012-10-02 09:09:10 -070011 String8_test.cpp \
12 Unicode_test.cpp \
13 Vector_test.cpp \
14 ZipFileRO_test.cpp
Jeff Browne839a582010-04-22 18:58:52 -070015
Jeff Brownf69280e2010-06-14 15:44:41 -070016shared_libraries := \
Kenny Rooted22c1c2012-10-02 09:09:10 -070017 libz \
18 liblog \
19 libcutils \
20 libutils \
21 libstlport
Jeff Browne839a582010-04-22 18:58:52 -070022
Jeff Brownf69280e2010-06-14 15:44:41 -070023static_libraries := \
Kenny Rooted22c1c2012-10-02 09:09:10 -070024 libgtest \
25 libgtest_main
Jeff Browne839a582010-04-22 18:58:52 -070026
27$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070028 $(eval include $(CLEAR_VARS)) \
29 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
30 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
Jeff Browne839a582010-04-22 18:58:52 -070031 $(eval LOCAL_SRC_FILES := $(file)) \
32 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Kenny Rooted22c1c2012-10-02 09:09:10 -070033 $(eval include $(BUILD_NATIVE_TEST)) \
Jeff Browne839a582010-04-22 18:58:52 -070034)