blob: caedaffc05353f97755ab5af51ecea4a8cda327a [file] [log] [blame]
Jeff Brown66db6892010-04-22 18:58:52 -07001# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Brown3f607c12010-07-14 22:40:08 -07005# Build the unit tests.
Jeff Brown66db6892010-04-22 18:58:52 -07006test_src_files := \
Kenny Root2fe13f12012-10-02 09:09:10 -07007 BasicHashtable_test.cpp \
8 BlobCache_test.cpp \
Michael Wrightd614ee42013-05-21 14:11:34 -07009 BitSet_test.cpp \
Kenny Root2fe13f12012-10-02 09:09:10 -070010 Looper_test.cpp \
Raph Levienb6ea1752012-10-25 23:11:13 -070011 LruCache_test.cpp \
Kenny Root2fe13f12012-10-02 09:09:10 -070012 String8_test.cpp \
13 Unicode_test.cpp \
Mathias Agopian9eb2a3b2013-05-06 20:20:50 -070014 Vector_test.cpp
Jeff Brown66db6892010-04-22 18:58:52 -070015
Jeff Brown80d9c1c2010-06-14 15:44:41 -070016shared_libraries := \
Kenny Root2fe13f12012-10-02 09:09:10 -070017 libz \
18 liblog \
19 libcutils \
20 libutils \
21 libstlport
Jeff Brown66db6892010-04-22 18:58:52 -070022
Jeff Brown80d9c1c2010-06-14 15:44:41 -070023static_libraries := \
Kenny Root2fe13f12012-10-02 09:09:10 -070024 libgtest \
25 libgtest_main
Jeff Brown66db6892010-04-22 18:58:52 -070026
27$(foreach file,$(test_src_files), \
Jeff Brown80d9c1c2010-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 Brown66db6892010-04-22 18:58:52 -070031 $(eval LOCAL_SRC_FILES := $(file)) \
32 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Kenny Root2fe13f12012-10-02 09:09:10 -070033 $(eval include $(BUILD_NATIVE_TEST)) \
Jeff Brown66db6892010-04-22 18:58:52 -070034)