blob: 9612a65fed25c453658f3912410e121f33b0c8f0 [file] [log] [blame]
Jeff Brown5912f952013-07-01 19:10:31 -07001# Build the unit tests.
2LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4
5# Build the unit tests.
6test_src_files := \
7 InputChannel_test.cpp \
8 InputEvent_test.cpp \
9 InputPublisherAndConsumer_test.cpp
10
11shared_libraries := \
12 libinput \
13 libcutils \
14 libutils \
15 libbinder \
16 libui \
Jeff Brown313eff72013-07-15 18:07:09 -070017 libstlport
Jeff Brown5912f952013-07-01 19:10:31 -070018
19static_libraries := \
20 libgtest \
21 libgtest_main
22
23$(foreach file,$(test_src_files), \
24 $(eval include $(CLEAR_VARS)) \
25 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
26 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
27 $(eval LOCAL_SRC_FILES := $(file)) \
28 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
29 $(eval include $(BUILD_NATIVE_TEST)) \
30)
31
Fengwei Yin83e0e422014-05-24 05:32:09 +080032# NOTE: This is a compile time test, and does not need to be
33# run. All assertions are static_asserts and will fail during
34# buildtime if something's wrong.
35include $(CLEAR_VARS)
36LOCAL_SRC_FILES := StructLayout_test.cpp
37LOCAL_MODULE := StructLayout_test
38LOCAL_CFLAGS := -std=c++11 -O0
39LOCAL_MULTILIB := both
40include $(BUILD_STATIC_LIBRARY)
41
42
Jeff Brown5912f952013-07-01 19:10:31 -070043# Build the manual test programs.
44include $(call all-makefiles-under, $(LOCAL_PATH))