1LOCAL_PATH := $(call my-dir) 2 3# Test -1: Throw in exec, catch in exec covered elsewhere 4 5# Test 0: Throw in lib, catch in lib 6 7include $(CLEAR_VARS) 8LOCAL_MODULE := test0_foo 9LOCAL_SRC_FILES := test0_foo.cpp 10include $(BUILD_SHARED_LIBRARY) 11 12include $(CLEAR_VARS) 13LOCAL_MODULE := Lib_catching_lib_throwing 14LOCAL_SRC_FILES := test0_main.cpp 15LOCAL_SHARED_LIBRARIES := test0_foo 16include $(BUILD_EXECUTABLE) 17 18# Test 1: Throw in lib, catch in exec 19include $(CLEAR_VARS) 20LOCAL_MODULE := test1_foo 21LOCAL_SRC_FILES := test1_foo.cpp 22include $(BUILD_SHARED_LIBRARY) 23 24include $(CLEAR_VARS) 25LOCAL_MODULE := exec_catching_lib_throwing 26LOCAL_SRC_FILES := test1_main.cpp 27LOCAL_SHARED_LIBRARIES := test1_foo 28include $(BUILD_EXECUTABLE) 29 30# Test 2: Throw in exec, catch in lib 31# Note: Symbol lookup from lib at exec fixed in bionic after android-14 32 33include $(CLEAR_VARS) 34LOCAL_MODULE := test2_foo 35LOCAL_SRC_FILES := test2_foo.cpp 36# This is required to rely on dynamic loader to resolve foo defined in exec 37LOCAL_ALLOW_UNDEFINED_SYMBOLS := true 38include $(BUILD_SHARED_LIBRARY) 39 40include $(CLEAR_VARS) 41LOCAL_MODULE := exec_throwing_lib_catching 42LOCAL_SRC_FILES := test2_main.cpp 43LOCAL_SHARED_LIBRARIES := test2_foo 44include $(BUILD_EXECUTABLE) 45 46# 47# 3 libs cases 48# 49 50# Test 3: Throw in lib2, catch in exec 51 52include $(CLEAR_VARS) 53LOCAL_MODULE := test3_bar 54LOCAL_SRC_FILES := test3_bar.cpp 55include $(BUILD_SHARED_LIBRARY) 56 57include $(CLEAR_VARS) 58LOCAL_MODULE := test3_foo 59LOCAL_SRC_FILES := test3_foo.cpp 60LOCAL_SHARED_LIBRARIES := test3_bar 61include $(BUILD_SHARED_LIBRARY) 62 63include $(CLEAR_VARS) 64LOCAL_MODULE := exec_catching_lib2_throwing 65LOCAL_SRC_FILES := test3_main.cpp 66LOCAL_SHARED_LIBRARIES := test3_foo test3_bar 67include $(BUILD_EXECUTABLE) 68 69# Test 4: Throw in lib2, catch in lib1 70 71include $(CLEAR_VARS) 72LOCAL_MODULE := test4_bar 73LOCAL_SRC_FILES := test4_bar.cpp 74include $(BUILD_SHARED_LIBRARY) 75 76include $(CLEAR_VARS) 77LOCAL_MODULE := test4_foo 78LOCAL_SRC_FILES := test4_foo.cpp 79LOCAL_SHARED_LIBRARIES := test4_bar 80include $(BUILD_SHARED_LIBRARY) 81 82include $(CLEAR_VARS) 83LOCAL_MODULE := Lib1_catching_lib2_throwing 84LOCAL_SRC_FILES := test4_main.cpp 85LOCAL_SHARED_LIBRARIES := test4_foo test4_bar 86include $(BUILD_EXECUTABLE) 87 88