diff --git a/test_tools/ci_test.sh b/test_tools/ci_test.sh index 9da94caf933d42e54f7050bdd301562e68d0106e..802f1c48b0c030dc4ab8385e57ec52d45b25f24e 100644 --- a/test_tools/ci_test.sh +++ b/test_tools/ci_test.sh @@ -119,12 +119,18 @@ function result_output() { } function test_result_ana() { + successNum=0 for one_suite in ${run_suitecase[@]}; do checkFail="" if [ -e ${results_path}/${one_suite}/failed ]; then checkFail=$(ls ${results_path}/${one_suite}/failed/) fi + if [ -e ${results_path}/${one_suite}/succeed ]; then + tmpSuccessNum=$(ls ${results_path}/${one_suite}/succeed/ | wc -l) + successNum=`expr $successNum + $tmpSuccessNum` + fi + for oneFail in ${checkFail[@]}; do if [[ "${ignoreFail[*]}" =~ "${oneFail}" ]]; then echo "INFO: ignore $oneFail test fail" @@ -135,6 +141,10 @@ function test_result_ana() { done done + if [ $successNum -eq 0 ]; then + exitCode=1 + fi + result_output } @@ -249,7 +259,7 @@ function set_param() { BUILD_ARCH="aarch64" fi if [ -z $BUILD_BRANCH ]; then - BUILD_BRANCH="master" + BUILD_BRANCH="openEuler-22.03-LTS-Next" if [[ ${BUILD_BRANCH} == "yocto_refactor" || ${BUILD_BRANCH} == "gitee_pages" ]]; then BUILD_BRANCH="master" fi @@ -277,6 +287,11 @@ function set_param() { } function main() { + # 环境准备 + if [ -e /opt/buildtools/nativesdk/environment-setup-x86_64-pokysdk-linux ]; then + source /opt/buildtools/nativesdk/environment-setup-x86_64-pokysdk-linux + export MUGEN_QEMU_ACL_DIR="/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/etc/qemu/" + fi set_param "$@" run_test_dir="${TEST_WORK_DIR}/test_run_dir_${BUILD_ARCH}_${IMAGE_TYPE}"