From e95b0481dc46944e17142e663ac026a5e6585f6d Mon Sep 17 00:00:00 2001 From: Zhuxuegang2022 Date: Tue, 24 Oct 2023 19:35:14 +0800 Subject: [PATCH] In integrate test add force threshold of 0.0001 and stress threhold 0.001 --- tests/integrate/Autotest.sh | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/tests/integrate/Autotest.sh b/tests/integrate/Autotest.sh index 314c6a7e8c..5310998097 100755 --- a/tests/integrate/Autotest.sh +++ b/tests/integrate/Autotest.sh @@ -110,16 +110,30 @@ check_out(){ break else if [ $(echo "sqrt($deviation*$deviation) < $threshold"|bc) = 0 ]; then - if [[ $key == "totalforceref" && $(echo "sqrt($deviation*$deviation) < $force_threshold"|bc) = 0 ]]; then - echo -e "[WARNING ] "\ - "$key cal=$cal ref=$ref deviation=$deviation" - let failed++ - failed_case_list+=$dir'\n' - elif [[ $key == "totalstressref" && $(echo "sqrt($deviation*$deviation) < $stress_threshold"|bc) = 0 ]]; then - echo -e "[WARNING ] "\ - "$key cal=$cal ref=$ref deviation=$deviation" - let failed++ - failed_case_list+=$dir'\n' + if [ $key == "totalforceref" ]; then + if [ $(echo "sqrt($deviation*$deviation) < $force_threshold"|bc) = 0 ]; then + echo -e "[WARNING ] "\ + "$key cal=$cal ref=$ref deviation=$deviation" + let failed++ + failed_case_list+=$dir'\n' + else + #echo "$key cal=$cal ref=$ref deviation=$deviation" + #echo "[ PASS ] $key" + echo -e "\e[0;32m[ OK ] \e[0m $key" + fi + + elif [ $key == "totalstressref" ]; then + if [ $(echo "sqrt($deviation*$deviation) < $stress_threshold"|bc) = 0 ]; then + echo -e "[WARNING ] "\ + "$key cal=$cal ref=$ref deviation=$deviation" + let failed++ + failed_case_list+=$dir'\n' + else + #echo "$key cal=$cal ref=$ref deviation=$deviation" + #echo "[ PASS ] $key" + echo -e "\e[0;32m[ OK ] \e[0m $key" + fi + else echo -e "[WARNING ] "\ "$key cal=$cal ref=$ref deviation=$deviation"