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 := \ |
Kenny Root | ed22c1c | 2012-10-02 09:09:10 -0700 | [diff] [blame] | 7 | BasicHashtable_test.cpp \ |
| 8 | BlobCache_test.cpp \ |
| 9 | Looper_test.cpp \ |
Raph Levien | 8185e47 | 2012-10-25 23:11:13 -0700 | [diff] [blame] | 10 | LruCache_test.cpp \ |
Kenny Root | ed22c1c | 2012-10-02 09:09:10 -0700 | [diff] [blame] | 11 | String8_test.cpp \ |
| 12 | Unicode_test.cpp \ |
| 13 | Vector_test.cpp \ |
| 14 | ZipFileRO_test.cpp |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 15 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 16 | shared_libraries := \ |
Kenny Root | ed22c1c | 2012-10-02 09:09:10 -0700 | [diff] [blame] | 17 | libz \ |
| 18 | liblog \ |
| 19 | libcutils \ |
| 20 | libutils \ |
| 21 | libstlport |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 22 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 23 | static_libraries := \ |
Kenny Root | ed22c1c | 2012-10-02 09:09:10 -0700 | [diff] [blame] | 24 | libgtest \ |
| 25 | libgtest_main |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 26 | |
| 27 | $(foreach file,$(test_src_files), \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 28 | $(eval include $(CLEAR_VARS)) \ |
| 29 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 30 | $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 31 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 32 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
Kenny Root | ed22c1c | 2012-10-02 09:09:10 -0700 | [diff] [blame] | 33 | $(eval include $(BUILD_NATIVE_TEST)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 34 | ) |