Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 1 | # Build the unit tests. |
| 2 | LOCAL_PATH := $(call my-dir) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
Jeff Brown | a50ee3e | 2010-07-14 22:40:08 -0700 | [diff] [blame] | 5 | # Build the unit tests. |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 6 | test_src_files := \ |
Jeff Brown | 66fbde3 | 2011-11-14 18:29:15 -0800 | [diff] [blame] | 7 | BasicHashtable_test.cpp \ |
Jamie Gennis | 58c8dd2 | 2011-04-28 16:19:45 -0700 | [diff] [blame] | 8 | BlobCache_test.cpp \ |
Jeff Brown | 59abe7e | 2010-09-13 23:17:30 -0700 | [diff] [blame] | 9 | Looper_test.cpp \ |
Jeff Brown | 66fbde3 | 2011-11-14 18:29:15 -0800 | [diff] [blame] | 10 | ObbFile_test.cpp \ |
Kenny Root | c412dcb | 2010-11-09 14:37:23 -0800 | [diff] [blame] | 11 | String8_test.cpp \ |
Kenny Root | 49a65e5 | 2011-07-12 14:14:01 -0700 | [diff] [blame] | 12 | Unicode_test.cpp \ |
| 13 | ZipFileRO_test.cpp \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 14 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 15 | shared_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 16 | libz \ |
| 17 | liblog \ |
| 18 | libcutils \ |
| 19 | libutils \ |
| 20 | libstlport |
| 21 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 22 | static_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 23 | libgtest \ |
| 24 | libgtest_main |
| 25 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 26 | c_includes := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 27 | external/zlib \ |
| 28 | external/icu4c/common \ |
| 29 | bionic \ |
| 30 | bionic/libstdc++/include \ |
| 31 | external/gtest/include \ |
| 32 | external/stlport/stlport |
| 33 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 34 | module_tags := eng tests |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 35 | |
| 36 | $(foreach file,$(test_src_files), \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 37 | $(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 Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 41 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 42 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 43 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 44 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 45 | ) |