blob: 9c7e1b8d5f3f00a77091d1bd22d636d64fed28fd [file] [log] [blame]
Andreas Gampecd2ef4c2014-08-19 22:31:31 -07001# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS)
4
5# Build the unit tests.
6test_src_files := \
7 InvalidCharsNativeBridge_test.cpp \
jgu21b3facbf2014-09-10 06:58:32 -04008 NeedsNativeBridge_test.cpp \
9 PreInitializeNativeBridge_test.cpp \
Andreas Gampecd2ef4c2014-08-19 22:31:31 -070010 ReSetupNativeBridge_test.cpp \
11 UnavailableNativeBridge_test.cpp \
12 ValidNameNativeBridge_test.cpp
13
14shared_libraries := \
15 liblog \
16 libnativebridge
17
18$(foreach file,$(test_src_files), \
19 $(eval include $(CLEAR_VARS)) \
20 $(eval LOCAL_CLANG := true) \
21 $(eval LOCAL_CPPFLAGS := -std=gnu++11) \
22 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
23 $(eval LOCAL_SRC_FILES := $(file)) \
24 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
25 $(eval include $(BUILD_NATIVE_TEST)) \
26)
27
28$(foreach file,$(test_src_files), \
29 $(eval include $(CLEAR_VARS)) \
30 $(eval LOCAL_CLANG := true) \
31 $(eval LOCAL_CPPFLAGS := -std=gnu++11) \
32 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
33 $(eval LOCAL_SRC_FILES := $(file)) \
34 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
35 $(eval include $(BUILD_HOST_NATIVE_TEST)) \
36)