Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 1 | # Build the unit tests. |
| 2 | LOCAL_PATH := $(call my-dir) |
Calin Juravle | f9d9e2a | 2014-10-17 13:45:39 +0100 | [diff] [blame] | 3 | |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 4 | include $(CLEAR_VARS) |
| 5 | |
| 6 | # Build the unit tests. |
| 7 | test_src_files := \ |
Calin Juravle | 59a719c | 2014-10-28 12:43:24 +0000 | [diff] [blame] | 8 | CodeCacheCreate_test.cpp \ |
| 9 | CodeCacheExists_test.cpp \ |
jgu21 | cef898f | 2015-07-02 12:02:11 +0800 | [diff] [blame] | 10 | CodeCacheStatFail_test.cpp \ |
Calin Juravle | f9d9e2a | 2014-10-17 13:45:39 +0100 | [diff] [blame] | 11 | CompleteFlow_test.cpp \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 12 | InvalidCharsNativeBridge_test.cpp \ |
Andreas Gampe | a6ac9ce | 2015-04-30 20:39:12 -0700 | [diff] [blame] | 13 | NativeBridge2Signal_test.cpp \ |
| 14 | NativeBridgeVersion_test.cpp \ |
Andreas Gampe | 04054e2 | 2014-09-25 22:33:01 -0700 | [diff] [blame] | 15 | NeedsNativeBridge_test.cpp \ |
| 16 | PreInitializeNativeBridge_test.cpp \ |
Calin Juravle | f9d9e2a | 2014-10-17 13:45:39 +0100 | [diff] [blame] | 17 | PreInitializeNativeBridgeFail1_test.cpp \ |
| 18 | PreInitializeNativeBridgeFail2_test.cpp \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 19 | ReSetupNativeBridge_test.cpp \ |
| 20 | UnavailableNativeBridge_test.cpp \ |
Zhenhua WANG | f2804e5 | 2016-05-30 11:16:08 +0800 | [diff] [blame] | 21 | ValidNameNativeBridge_test.cpp \ |
| 22 | NativeBridge3UnloadLibrary_test.cpp \ |
| 23 | NativeBridge3GetError_test.cpp \ |
| 24 | NativeBridge3IsPathSupported_test.cpp \ |
Zhenhua WANG | e8fb11d | 2017-02-27 10:14:45 +0800 | [diff] [blame] | 25 | NativeBridge3InitAnonymousNamespace_test.cpp \ |
Zhenhua WANG | f2804e5 | 2016-05-30 11:16:08 +0800 | [diff] [blame] | 26 | NativeBridge3CreateNamespace_test.cpp \ |
| 27 | NativeBridge3LoadLibraryExt_test.cpp |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 28 | |
Calin Juravle | f9d9e2a | 2014-10-17 13:45:39 +0100 | [diff] [blame] | 29 | |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 30 | shared_libraries := \ |
| 31 | liblog \ |
dimitry | b6ba817 | 2017-08-23 10:25:22 +0200 | [diff] [blame] | 32 | libbase \ |
Calin Juravle | f9d9e2a | 2014-10-17 13:45:39 +0100 | [diff] [blame] | 33 | libnativebridge \ |
| 34 | libnativebridge-dummy |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 35 | |
Chih-Hung Hsieh | 048df23 | 2017-10-31 15:54:05 -0700 | [diff] [blame] | 36 | libnativebridge_tests_common_cflags := \ |
| 37 | -Wall \ |
| 38 | -Werror \ |
| 39 | |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 40 | $(foreach file,$(test_src_files), \ |
| 41 | $(eval include $(CLEAR_VARS)) \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 42 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 43 | $(eval LOCAL_SRC_FILES := $(file)) \ |
Chih-Hung Hsieh | 048df23 | 2017-10-31 15:54:05 -0700 | [diff] [blame] | 44 | $(eval LOCAL_CFLAGS := $(libnativebridge_tests_common_cflags)) \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 45 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
| 46 | $(eval include $(BUILD_NATIVE_TEST)) \ |
| 47 | ) |
| 48 | |
| 49 | $(foreach file,$(test_src_files), \ |
| 50 | $(eval include $(CLEAR_VARS)) \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 51 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 52 | $(eval LOCAL_SRC_FILES := $(file)) \ |
Chih-Hung Hsieh | 048df23 | 2017-10-31 15:54:05 -0700 | [diff] [blame] | 53 | $(eval LOCAL_CFLAGS := $(libnativebridge_tests_common_cflags)) \ |
Andreas Gampe | cd2ef4c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 54 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
| 55 | $(eval include $(BUILD_HOST_NATIVE_TEST)) \ |
Andreas Gampe | 049249c | 2014-08-19 22:31:31 -0700 | [diff] [blame] | 56 | ) |