blob: 580d73cf384c0bc462d5ef299b61c70154ce87a3 [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 \
Jeff Brownf4a4ec22010-06-16 01:53:36 -070010 InputPublisherAndConsumer_test.cpp
Mathias Agopian20f68782009-05-11 00:03:41 -070011
Jeff Brownf69280e2010-06-14 15:44:41 -070012shared_libraries := \
Mathias Agopian20f68782009-05-11 00:03:41 -070013 libcutils \
14 libutils \
Jeff Browne839a582010-04-22 18:58:52 -070015 libEGL \
16 libbinder \
17 libpixelflinger \
18 libhardware \
19 libhardware_legacy \
20 libui \
21 libstlport
Mathias Agopian20f68782009-05-11 00:03:41 -070022
Jeff Brownf69280e2010-06-14 15:44:41 -070023static_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070024 libgtest \
25 libgtest_main
Mathias Agopian20f68782009-05-11 00:03:41 -070026
Jeff Brownf69280e2010-06-14 15:44:41 -070027c_includes := \
Jeff Browne839a582010-04-22 18:58:52 -070028 bionic \
29 bionic/libstdc++/include \
30 external/gtest/include \
31 external/stlport/stlport
Mathias Agopian20f68782009-05-11 00:03:41 -070032
Jeff Brownf69280e2010-06-14 15:44:41 -070033module_tags := eng tests
Jeff Browne839a582010-04-22 18:58:52 -070034
35$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070036 $(eval include $(CLEAR_VARS)) \
37 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
38 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
39 $(eval LOCAL_C_INCLUDES := $(c_includes)) \
Jeff Browne839a582010-04-22 18:58:52 -070040 $(eval LOCAL_SRC_FILES := $(file)) \
41 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf69280e2010-06-14 15:44:41 -070042 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Browne839a582010-04-22 18:58:52 -070043 $(eval include $(BUILD_EXECUTABLE)) \
44)
45
46# Build the manual test programs.
47include $(call all-subdir-makefiles)
Jeff Browna50ee3e2010-07-14 22:40:08 -070048
49endif