4 audio_bluetooth_hw_test
5 bluetooth-test-audio-hal-interface
14 net_test_btif_profile_queue
15 net_test_btif_config_cache
19 net_test_stack_multi_adv
20 net_test_stack_ad_parser
23 net_test_btu_message_loop
27 net_test_gatt_conn_multiplexing
36 binary="$(basename "$0")"
37 echo "Usage: ${binary} --help"
38 echo " ${binary} [-i <iterations>] [-s <specific device>] [--all] [<test name>[.<filter>] ...] [--<arg> ...]"
40 echo "Unknown long arguments are passed to the test."
42 echo "Known test names:"
44 for name in "${known_tests[@]}"
50 echo "Known tests that need a remote device:"
51 for name in "${known_remote_tests[@]}"
71 echo "error: number of iterations expected" 1>&2
81 echo "error: no device specified" 1>&2
89 tests+=( "${known_tests[@]}" )
103 if [ "${#tests[@]}" -eq 0 ]; then
104 tests+=( "${known_tests[@]}" )
108 if [ -n "${device}" ]; then
109 adb+=( "-s" "${device}" )
112 source ${ANDROID_BUILD_TOP}/build/envsetup.sh
113 target_arch=$(gettargetarch)
116 for spec in "${tests[@]}"
119 if [[ $target_arch == *"64"* ]]; then
120 binary="/data/nativetest64/${name}/${name}"
122 binary="/data/nativetest/${name}/${name}"
125 push_command=( "${adb[@]}" push {"${ANDROID_PRODUCT_OUT}",}"${binary}" )
126 test_command=( "${adb[@]}" shell "${binary}" )
127 if [ "${name}" != "${spec}" ]; then
129 test_command+=( "--gtest_filter=${filter}" )
131 test_command+=( "${test_args[@]}" )
133 echo "--- ${name} ---"
138 for i in $(seq 1 ${iterations})
140 "${test_command[@]}" || failed_count=$(( $failed_count + 1 ))
143 if [ $failed_count != 0 ]; then
144 failed_tests+=( "${name} ${failed_count}/${iterations}" )
148 if [ "${#failed_tests[@]}" -ne 0 ]; then
149 for failed_test in "${failed_tests[@]}"
151 echo "!!! FAILED TEST: ${failed_test} !!!"