blob: 285e8c242085eb43230aacbfe9862b37ea2f24b2 [file] [log] [blame]
Andreas Gampecd2ef4c2014-08-19 22:31:31 -07001# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
Calin Juravle1402fbb2014-10-17 13:45:39 +01003
4include $(LOCAL_PATH)/Android.nativebridge-dummy.mk
5
Andreas Gampecd2ef4c2014-08-19 22:31:31 -07006include $(CLEAR_VARS)
7
8# Build the unit tests.
9test_src_files := \
Calin Juravle9ef4fa42014-10-28 12:43:24 +000010 CodeCacheCreate_test.cpp \
11 CodeCacheExists_test.cpp \
Calin Juravle1402fbb2014-10-17 13:45:39 +010012 CompleteFlow_test.cpp \
Andreas Gampecd2ef4c2014-08-19 22:31:31 -070013 InvalidCharsNativeBridge_test.cpp \
Andreas Gampee2452b42015-04-30 20:39:12 -070014 NativeBridge2Signal_test.cpp \
15 NativeBridgeVersion_test.cpp \
jgu21b3facbf2014-09-10 06:58:32 -040016 NeedsNativeBridge_test.cpp \
17 PreInitializeNativeBridge_test.cpp \
Calin Juravle1402fbb2014-10-17 13:45:39 +010018 PreInitializeNativeBridgeFail1_test.cpp \
19 PreInitializeNativeBridgeFail2_test.cpp \
Andreas Gampecd2ef4c2014-08-19 22:31:31 -070020 ReSetupNativeBridge_test.cpp \
21 UnavailableNativeBridge_test.cpp \
22 ValidNameNativeBridge_test.cpp
23
Calin Juravle1402fbb2014-10-17 13:45:39 +010024
Andreas Gampecd2ef4c2014-08-19 22:31:31 -070025shared_libraries := \
26 liblog \
Calin Juravle1402fbb2014-10-17 13:45:39 +010027 libnativebridge \
28 libnativebridge-dummy
Andreas Gampecd2ef4c2014-08-19 22:31:31 -070029
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)) \
Calin Juravle1402fbb2014-10-17 13:45:39 +010048)