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