File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,16 @@ jobs:
9898 [ -z "$executed" ] && executed=$((passed+failed))
9999 skipped=$((total-executed))
100100
101- duration=$(grep -oP 'duration="\K[0-9\.]+' "$path" | head -1)
101+ local rd
102+ rd=$(grep -oP 'runDuration="\K[^"]+' "$path" | head -1)
103+ if [ -n "$rd" ]; then
104+ duration=$(echo "$rd" | awk -F: '{ sub(/\..*/, "", $3); print $1*3600 + $2*60 + $3 }')
105+ fi
102106
103107 if [ -z "$duration" ]; then
104- local rd h m s
105- rd=$(grep -oP 'runDuration="\K[0-9:.]+' "$path" | head -1)
108+ rd=$(grep -oP 'duration="\K[^"]+' "$path" | head -1)
106109 if [ -n "$rd" ]; then
107- IFS=: read -r h m s <<<"${rd%%.*}"
108- duration=$((10#$h*3600 + 10#$m*60 + 10#$s))
110+ duration=$(echo "$rd" | awk -F: '{ sub(/\..*/, "", $3); print $1*3600 + $2*60 + $3 }')
109111 fi
110112 fi
111113
You can’t perform that action at this time.
0 commit comments