blob: 62f824fc72160c42e9a23ccab627b5d0582f97c2 [file] [log] [blame]
Jeff Browne839a582010-04-22 18:58:52 -07001# Build the unit tests.
Mathias Agopian20f68782009-05-11 00:03:41 -07002LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Browna50ee3e2010-07-14 22:40:08 -07005ifneq ($(TARGET_SIMULATOR),true)
6
7# Build the unit tests.
Jeff Browne839a582010-04-22 18:58:52 -07008test_src_files := \
Jeff Brownf4a4ec22010-06-16 01:53:36 -07009 InputChannel_test.cpp \
10 InputDispatcher_test.cpp \
11 InputPublisherAndConsumer_test.cpp
Mathias Agopian20f68782009-05-11 00:03:41 -070012
Jeff Brownf69280e2010-06-14 15:44:41 -070013shared_libraries := \
Mathias Agopian20f68782009-05-11 00:03:41 -070014 libcutils \
15 libutils \
Jeff Browne839a582010-04-22 18:58:52 -070016 libEGL \
17 libbinder \
18 libpixelflinger \
19 libhardware \
20 libhardware_legacy \
21 libui \
22 libstlport
Mathias Agopian20f68782009-05-11 00:03:41 -070023
Jeff Brownf69280e2010-06-14 15:44:41 -070024static_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070025 libgtest \
26 libgtest_main
Mathias Agopian20f68782009-05-11 00:03:41 -070027
Jeff Brownf69280e2010-06-14 15:44:41 -070028c_includes := \
Jeff Browne839a582010-04-22 18:58:52 -070029 bionic \
30 bionic/libstdc++/include \
31 external/gtest/include \
32 external/stlport/stlport
Mathias Agopian20f68782009-05-11 00:03:41 -070033
Jeff Brownf69280e2010-06-14 15:44:41 -070034module_tags := eng tests
Jeff Browne839a582010-04-22 18:58:52 -070035
36$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070037 $(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)) \
Jeff Browne839a582010-04-22 18:58:52 -070041 $(eval LOCAL_SRC_FILES := $(file)) \
42 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf69280e2010-06-14 15:44:41 -070043 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Browne839a582010-04-22 18:58:52 -070044 $(eval include $(BUILD_EXECUTABLE)) \
45)
46
47# Build the manual test programs.
48include $(call all-subdir-makefiles)
Jeff Browna50ee3e2010-07-14 22:40:08 -070049
50endif