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 	BasicHashtable_test.cpp \
      8 	BlobCache_test.cpp \
      9 	Looper_test.cpp \
     10 	String8_test.cpp \
     11 	Unicode_test.cpp \
     12 	Vector_test.cpp \
     13 	ZipFileRO_test.cpp
     14 
     15 shared_libraries := \
     16 	libz \
     17 	liblog \
     18 	libcutils \
     19 	libutils \
     20 	libstlport
     21 
     22 static_libraries := \
     23 	libgtest \
     24 	libgtest_main
     25 
     26 c_includes := \
     27     external/zlib \
     28     external/icu4c/common \
     29     bionic \
     30     bionic/libstdc++/include \
     31     external/gtest/include \
     32     external/stlport/stlport
     33 
     34 module_tags := eng tests
     35 
     36 $(foreach file,$(test_src_files), \
     37     $(eval include $(CLEAR_VARS)) \
     38     $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
     39     $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
     40     $(eval LOCAL_C_INCLUDES := $(c_includes)) \
     41     $(eval LOCAL_SRC_FILES := $(file)) \
     42     $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
     43     $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
     44     $(eval include $(BUILD_EXECUTABLE)) \
     45 )
     46