Home | History | Annotate | Download | only in tests
      1 # Build the unit tests.
      2 LOCAL_PATH:= $(call my-dir)
      3 include $(CLEAR_VARS)
      4 
      5 # Build the unit tests.
      6 test_src_files := \
      7     InputReader_test.cpp \
      8     InputDispatcher_test.cpp
      9 
     10 shared_libraries := \
     11     libcutils \
     12     liblog \
     13     libandroidfw \
     14     libutils \
     15     libhardware \
     16     libhardware_legacy \
     17     libui \
     18     libskia \
     19     libstlport \
     20     libinput \
     21     libinputflinger \
     22     libinputservice
     23 
     24 static_libraries := \
     25     libgtest \
     26     libgtest_main
     27 
     28 c_includes := \
     29     bionic \
     30     bionic/libstdc++/include \
     31     external/gtest/include \
     32     external/stlport/stlport \
     33     external/skia/include/core
     34 
     35 
     36 module_tags := eng tests
     37 
     38 $(foreach file,$(test_src_files), \
     39     $(eval include $(CLEAR_VARS)) \
     40     $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
     41     $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
     42     $(eval LOCAL_C_INCLUDES := $(c_includes)) \
     43 	$(eval LOCAL_CFLAGS += -Wno-unused-parameter) \
     44     $(eval LOCAL_SRC_FILES := $(file)) \
     45     $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
     46     $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
     47     $(eval include $(BUILD_NATIVE_TEST)) \
     48 )
     49 
     50 # Build the manual test programs.
     51 include $(call all-makefiles-under, $(LOCAL_PATH))
     52