blob: 5bfa3d4808a9e6f87cbc06b2209b90fdd234afda [file] [log] [blame]
Jeff Brown5912f952013-07-01 19:10:31 -07001# Build the unit tests.
2LOCAL_PATH:= $(call my-dir)
Jeff Brown5912f952013-07-01 19:10:31 -07003
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 \
Jeff Brown5912f952013-07-01 19:10:31 -070016
17$(foreach file,$(test_src_files), \
18 $(eval include $(CLEAR_VARS)) \
Dan Albertb79dfe62014-09-11 18:45:33 -070019 $(eval LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk) \
Jeff Brown5912f952013-07-01 19:10:31 -070020 $(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
Fengwei Yin83e0e422014-05-24 05:32:09 +080027# 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)
Dan Albertb79dfe62014-09-11 18:45:33 -070031LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Fengwei Yin83e0e422014-05-24 05:32:09 +080032LOCAL_SRC_FILES := StructLayout_test.cpp
33LOCAL_MODULE := StructLayout_test
34LOCAL_CFLAGS := -std=c++11 -O0
35LOCAL_MULTILIB := both
36include $(BUILD_STATIC_LIBRARY)
37
38
Jeff Brown5912f952013-07-01 19:10:31 -070039# Build the manual test programs.
40include $(call all-makefiles-under, $(LOCAL_PATH))