Home | History | Annotate | Download | only in jni
      1 LOCAL_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 
      7 include $(CLEAR_VARS)
      8 LOCAL_MODULE := test0_foo
      9 LOCAL_SRC_FILES := test0_foo.cpp
     10 include $(BUILD_STATIC_LIBRARY)
     11 
     12 include $(CLEAR_VARS)
     13 LOCAL_MODULE := Lib_catching_lib_throwing
     14 LOCAL_SRC_FILES := test0_main.cpp
     15 LOCAL_STATIC_LIBRARIES := test0_foo
     16 include $(BUILD_EXECUTABLE)
     17 
     18 # Test 1: Throw in lib, catch in exec
     19 include $(CLEAR_VARS)
     20 LOCAL_MODULE := test1_foo
     21 LOCAL_SRC_FILES := test1_foo.cpp
     22 include $(BUILD_STATIC_LIBRARY)
     23 
     24 include $(CLEAR_VARS)
     25 LOCAL_MODULE := exec_catching_lib_throwing
     26 LOCAL_SRC_FILES := test1_main.cpp
     27 LOCAL_STATIC_LIBRARIES := test1_foo
     28 include $(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 
     33 include $(CLEAR_VARS)
     34 LOCAL_MODULE := test2_foo
     35 LOCAL_SRC_FILES := test2_foo.cpp
     36 # This is required to rely on dynamic loader to resolve foo defined in exec
     37 LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
     38 include $(BUILD_STATIC_LIBRARY)
     39 
     40 include $(CLEAR_VARS)
     41 LOCAL_MODULE := exec_throwing_lib_catching
     42 LOCAL_SRC_FILES := test2_main.cpp
     43 LOCAL_STATIC_LIBRARIES := test2_foo
     44 include $(BUILD_EXECUTABLE)
     45 
     46 #
     47 # 3 libs cases
     48 #
     49 
     50 # Test 3: Throw in lib2, catch in exec
     51 
     52 include $(CLEAR_VARS)
     53 LOCAL_MODULE := test3_bar
     54 LOCAL_SRC_FILES := test3_bar.cpp
     55 include $(BUILD_STATIC_LIBRARY)
     56 
     57 include $(CLEAR_VARS)
     58 LOCAL_MODULE := test3_foo
     59 LOCAL_SRC_FILES := test3_foo.cpp
     60 LOCAL_STATIC_LIBRARIES := test3_bar
     61 include $(BUILD_STATIC_LIBRARY)
     62 
     63 include $(CLEAR_VARS)
     64 LOCAL_MODULE := exec_catching_lib2_throwing
     65 LOCAL_SRC_FILES := test3_main.cpp
     66 LOCAL_STATIC_LIBRARIES := test3_foo test3_bar
     67 include $(BUILD_EXECUTABLE)
     68 
     69 # Test 4: Throw in lib2, catch in lib1
     70 
     71 include $(CLEAR_VARS)
     72 LOCAL_MODULE := test4_bar
     73 LOCAL_SRC_FILES := test4_bar.cpp
     74 include $(BUILD_STATIC_LIBRARY)
     75 
     76 include $(CLEAR_VARS)
     77 LOCAL_MODULE := test4_foo
     78 LOCAL_SRC_FILES := test4_foo.cpp
     79 LOCAL_STATIC_LIBRARIES := test4_bar
     80 include $(BUILD_STATIC_LIBRARY)
     81 
     82 include $(CLEAR_VARS)
     83 LOCAL_MODULE := Lib1_catching_lib2_throwing
     84 LOCAL_SRC_FILES := test4_main.cpp
     85 LOCAL_STATIC_LIBRARIES := test4_foo test4_bar
     86 include $(BUILD_EXECUTABLE)
     87 
     88