Android.mk 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Build the unit tests.
  2. LOCAL_PATH:= $(call my-dir)
  3. # Build the unit tests.
  4. test_src_files := \
  5. InputChannel_test.cpp \
  6. InputEvent_test.cpp \
  7. InputPublisherAndConsumer_test.cpp
  8. shared_libraries := \
  9. libinput \
  10. libcutils \
  11. libutils \
  12. libbinder \
  13. libui \
  14. $(foreach file,$(test_src_files), \
  15. $(eval include $(CLEAR_VARS)) \
  16. $(eval LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk) \
  17. $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
  18. $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
  19. $(eval LOCAL_SRC_FILES := $(file)) \
  20. $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
  21. $(eval include $(BUILD_NATIVE_TEST)) \
  22. )
  23. # NOTE: This is a compile time test, and does not need to be
  24. # run. All assertions are static_asserts and will fail during
  25. # buildtime if something's wrong.
  26. include $(CLEAR_VARS)
  27. LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
  28. LOCAL_SRC_FILES := StructLayout_test.cpp
  29. LOCAL_MODULE := StructLayout_test
  30. LOCAL_CFLAGS := -std=c++11 -O0
  31. LOCAL_MULTILIB := both
  32. include $(BUILD_STATIC_LIBRARY)
  33. # Build the manual test programs.
  34. include $(call all-makefiles-under, $(LOCAL_PATH))