Update self-hosted.yml (#687)

add a TIMEOUT for TIM-VX check. If this step fails, there is a high probability that the local board has problems.There is a TIMEOUT to find problems faster.
This commit is contained in:
zhongzhuonan 2024-03-21 14:22:30 +08:00 committed by GitHub
parent 8ca1382474
commit e3d891a477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -37,8 +37,21 @@ jobs:
steps:
- name: check_TIM-VX_result
run: |
start_time=$(date +%s)
max_duration=3600
while true
do
current_time=$(date +%s)
elapsed_time=$((current_time - start_time))
if [[ $elapsed_time -ge $max_duration ]];then
echo "TIM-VX result check has exceeded 1 hour."
echo "Please check the local board."
exit 1
fi
if [[ -e /home/vip_sqa/build_case/result/TIM-VX_unit_test_qua.txt ]];then
total_num=`cat /home/vip_sqa/build_case/result/TIM-VX_unit_test_qua.txt | grep "Total" | awk -F ':' '{print $2}' | sed 's/ //g'`
pass_num=`cat /home/vip_sqa/build_case/result/TIM-VX_unit_test_qua.txt | grep "Pass" | awk -F ':' '{print $2}' | sed 's/ //g'`