From 8fd26a42d42672a617cbf0d7a65d29e25b4f3fc5 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Wed, 23 Dec 2020 11:44:58 +0800 Subject: [PATCH] [TD-2535]Improve script success rate --- tests/test-all.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index 4448c8a2a4..30d687de98 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -31,11 +31,17 @@ function runSimCaseOneByOnefq { case=`echo $line | grep sim$ |awk '{print $NF}'` start_time=`date +%s` - ./test.sh -f $case > /dev/null 2>&1 && \ + IN_TDINTERNAL="community" + if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then + ./test.sh -f $case > /dev/null 2>&1 && \ echo -e "${GREEN}$case success${NC}" | tee -a out.log || \ ( grep 'script.*success.*m$' ../../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN}$case success${NC}" | tee -a out.log ) || echo -e "${RED}$case failed${NC}" | tee -a out.log - - + else + ./test.sh -f $case > /dev/null 2>&1 && \ + echo -e "${GREEN}$case success${NC}" | tee -a out.log || \ + ( grep 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN}$case success${NC}" | tee -a out.log ) || echo -e "${RED}$case failed${NC}" | tee -a out.log + fi + out_log=`tail -1 out.log ` if [[ $out_log =~ 'failed' ]];then exit 8 -- GitLab