From b4270a98a8c8ee130eea051aecaa7ee9f1ecac59 Mon Sep 17 00:00:00 2001 From: saarloos <9090-90-90-9090@163.com> Date: Fri, 11 Nov 2022 17:01:21 +0800 Subject: [PATCH] test: add set env and fix no run but success add set env and fix no run but success Signed-off-by: saarloos <9090-90-90-9090@163.com> --- test_tools/ci_test.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test_tools/ci_test.sh b/test_tools/ci_test.sh index e8561a3c..6e91e0b4 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.09" if [[ ${BUILD_BRANCH} == "yocto_refactor" || ${BUILD_BRANCH} == "gitee_pages" ]]; then BUILD_BRANCH="master" fi @@ -280,6 +290,7 @@ 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 "$@" -- Gitee