1# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3
4include $(LOCAL_PATH)/Android.nativebridge-dummy.mk
5
6include $(CLEAR_VARS)
7
8# Build the unit tests.
9test_src_files := \
10    CodeCacheCreate_test.cpp \
11    CodeCacheExists_test.cpp \
12    CompleteFlow_test.cpp \
13    InvalidCharsNativeBridge_test.cpp \
14    NativeBridge2Signal_test.cpp \
15    NativeBridgeVersion_test.cpp \
16    NeedsNativeBridge_test.cpp \
17    PreInitializeNativeBridge_test.cpp \
18    PreInitializeNativeBridgeFail1_test.cpp \
19    PreInitializeNativeBridgeFail2_test.cpp \
20    ReSetupNativeBridge_test.cpp \
21    UnavailableNativeBridge_test.cpp \
22    ValidNameNativeBridge_test.cpp
23
24
25shared_libraries := \
26    liblog \
27    libnativebridge \
28    libnativebridge-dummy
29
30$(foreach file,$(test_src_files), \
31    $(eval include $(CLEAR_VARS)) \
32    $(eval LOCAL_CLANG := true) \
33    $(eval LOCAL_CPPFLAGS := -std=gnu++11) \
34    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
35    $(eval LOCAL_SRC_FILES := $(file)) \
36    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
37    $(eval include $(BUILD_NATIVE_TEST)) \
38)
39
40$(foreach file,$(test_src_files), \
41    $(eval include $(CLEAR_VARS)) \
42    $(eval LOCAL_CLANG := true) \
43    $(eval LOCAL_CPPFLAGS := -std=gnu++11) \
44    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
45    $(eval LOCAL_SRC_FILES := $(file)) \
46    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
47    $(eval include $(BUILD_HOST_NATIVE_TEST)) \
48)
49