| Jeff Brown | 5912f95 | 2013-07-01 19:10:31 -0700 | [diff] [blame] | 1 | # Build the unit tests. | 
 | 2 | LOCAL_PATH:= $(call my-dir) | 
| Jeff Brown | 5912f95 | 2013-07-01 19:10:31 -0700 | [diff] [blame] | 3 |  | 
 | 4 | # Build the unit tests. | 
 | 5 | test_src_files := \ | 
 | 6 |     InputChannel_test.cpp \ | 
 | 7 |     InputEvent_test.cpp \ | 
 | 8 |     InputPublisherAndConsumer_test.cpp | 
 | 9 |  | 
 | 10 | shared_libraries := \ | 
 | 11 |     libinput \ | 
 | 12 |     libcutils \ | 
 | 13 |     libutils \ | 
 | 14 |     libbinder \ | 
 | 15 |     libui \ | 
| Jeff Brown | 5912f95 | 2013-07-01 19:10:31 -0700 | [diff] [blame] | 16 |  | 
 | 17 | $(foreach file,$(test_src_files), \ | 
 | 18 |     $(eval include $(CLEAR_VARS)) \ | 
| Dan Albert | b79dfe6 | 2014-09-11 18:45:33 -0700 | [diff] [blame] | 19 |     $(eval LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk) \ | 
| Jeff Brown | 5912f95 | 2013-07-01 19:10:31 -0700 | [diff] [blame] | 20 |     $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ | 
 | 21 |     $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ | 
 | 22 |     $(eval LOCAL_SRC_FILES := $(file)) \ | 
 | 23 |     $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ | 
 | 24 |     $(eval include $(BUILD_NATIVE_TEST)) \ | 
 | 25 | ) | 
 | 26 |  | 
| Fengwei Yin | 83e0e42 | 2014-05-24 05:32:09 +0800 | [diff] [blame] | 27 | # NOTE: This is a compile time test, and does not need to be | 
 | 28 | # run. All assertions are static_asserts and will fail during | 
 | 29 | # buildtime if something's wrong. | 
 | 30 | include $(CLEAR_VARS) | 
| Dan Albert | b79dfe6 | 2014-09-11 18:45:33 -0700 | [diff] [blame] | 31 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | 
| Fengwei Yin | 83e0e42 | 2014-05-24 05:32:09 +0800 | [diff] [blame] | 32 | LOCAL_SRC_FILES := StructLayout_test.cpp | 
 | 33 | LOCAL_MODULE := StructLayout_test | 
 | 34 | LOCAL_CFLAGS := -std=c++11 -O0 | 
 | 35 | LOCAL_MULTILIB := both | 
 | 36 | include $(BUILD_STATIC_LIBRARY) | 
 | 37 |  | 
 | 38 |  | 
| Jeff Brown | 5912f95 | 2013-07-01 19:10:31 -0700 | [diff] [blame] | 39 | # Build the manual test programs. | 
 | 40 | include $(call all-makefiles-under, $(LOCAL_PATH)) |