File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -98,23 +98,21 @@ jobs:
9898 [ -z "$executed" ] && executed=$((passed+failed))
9999 skipped=$((total-executed))
100100
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
101+ duration=$(grep -oP 'duration="\K[0-9\.]+' "$path" | head -1)
106102
107103 if [ -z "$duration" ]; then
108- rd=$(grep -oP 'duration="\K[^"]+' "$path" | head -1)
104+ local rd h m s
105+ rd=$(grep -oP 'runDuration="\K[0-9:.]+' "$path" | head -1)
109106 if [ -n "$rd" ]; then
110- duration=$(echo "$rd" | awk -F: '{ sub(/\..*/, "", $3); print $1*3600 + $2*60 + $3 }')
107+ IFS=: read -r h m s <<<"${rd%%.*}"
108+ duration=$((10#$h*3600 + 10#$m*60 + 10#$s))
111109 fi
112110 fi
113111
114112 if [ -z "$duration" ]; then
115113 local start finish ds df
116- start=$(grep -oP 'start="\K[^"]+' "$path" | head -1)
117- finish=$(grep -oP 'finish="\K[^"]+' "$path" | head -1)
114+ start=$(grep -oP '<Times[^>]* start="\K[^"]+' "$path" | head -1)
115+ finish=$(grep -oP '<Times[^>]* finish="\K[^"]+' "$path" | head -1)
118116 if [ -n "$start" ] && [ -n "$finish" ]; then
119117 ds=$(iso_to_epoch "$start")
120118 df=$(iso_to_epoch "$finish")
You can’t perform that action at this time.
0 commit comments