1#!/bin/bash 2 3function run() { 4 local FAILED_TESTS=() 5 6 # the linter test requires having the source tree available in order 7 # to run, so it isn't using TEST_MAPPING/tradefed/etc 8 local RUN_TIME_TESTS=(\ 9 hidl-lint_test \ 10 ) 11 12 $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode -j \ 13 ${RUN_TIME_TESTS[*]} || return 14 15 local BITNESS=("nativetest" "nativetest64") 16 17 for bits in ${BITNESS[@]}; do 18 for test in ${RUN_TIME_TESTS[@]}; do 19 echo $bits $test 20 $ANDROID_BUILD_TOP/out/host/linux-x86/$bits/$test/$test || 21 FAILED_TESTS+=("$bits:$test") 22 done 23 done 24 25 echo 26 echo ===== ALL HOST TESTS SUMMARY ===== 27 echo 28 if [ ${#FAILED_TESTS[@]} -gt 0 ]; then 29 for failed in ${FAILED_TESTS[@]}; do 30 echo "FAILED TEST: $failed" 31 done 32 else 33 echo "SUCCESS" 34 fi 35} 36 37run 38