1# Build the unit tests. 2LOCAL_PATH:= $(call my-dir) 3 4# Build the unit tests. 5test_src_files := \ 6 InputChannel_test.cpp \ 7 InputEvent_test.cpp \ 8 InputPublisherAndConsumer_test.cpp 9 10shared_libraries := \ 11 libinput \ 12 libcutils \ 13 libutils \ 14 libbinder \ 15 libui \ 16 17$(foreach file,$(test_src_files), \ 18 $(eval include $(CLEAR_VARS)) \ 19 $(eval LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk) \ 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 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. 30include $(CLEAR_VARS) 31LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 32LOCAL_SRC_FILES := StructLayout_test.cpp 33LOCAL_MODULE := StructLayout_test 34LOCAL_CFLAGS := -std=c++11 -O0 35LOCAL_MULTILIB := both 36include $(BUILD_STATIC_LIBRARY) 37 38 39# Build the manual test programs. 40include $(call all-makefiles-under, $(LOCAL_PATH)) 41