blob: a6d9cbe7bf4b42f083cd82df06756a5c6abb5b61 [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 \
Mathias Agopian002e1e52013-05-06 20:20:50 -070013 Vector_test.cpp
Jeff Browne839a582010-04-22 18:58:52 -070014
Jeff Brownf69280e2010-06-14 15:44:41 -070015shared_libraries := \
Kenny Rooted22c1c2012-10-02 09:09:10 -070016 libz \
17 liblog \
18 libcutils \
19 libutils \
20 libstlport
Jeff Browne839a582010-04-22 18:58:52 -070021
Jeff Brownf69280e2010-06-14 15:44:41 -070022static_libraries := \
Kenny Rooted22c1c2012-10-02 09:09:10 -070023 libgtest \
24 libgtest_main
Jeff Browne839a582010-04-22 18:58:52 -070025
26$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070027 $(eval include $(CLEAR_VARS)) \
28 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
29 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
Jeff Browne839a582010-04-22 18:58:52 -070030 $(eval LOCAL_SRC_FILES := $(file)) \
31 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Kenny Rooted22c1c2012-10-02 09:09:10 -070032 $(eval include $(BUILD_NATIVE_TEST)) \
Jeff Browne839a582010-04-22 18:58:52 -070033)