File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
scaletest/templates/scaletest-runner/scripts Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ get_status() {
42
42
43
43
phase_num=0
44
44
start_phase () {
45
+ # This may be incremented from another script, so we read it every time.
46
+ if [[ -f " ${SCALETEST_PHASE_FILE} " ]]; then
47
+ phase_num=" $( grep -c START: " ${SCALETEST_PHASE_FILE} " ) "
48
+ fi
45
49
phase_num=$(( phase_num + 1 ))
46
50
log " Start phase ${phase_num} : ${* } "
47
51
echo " $( date -Iseconds) START:${phase_num} : ${* } " >> " ${SCALETEST_PHASE_FILE} "
@@ -68,7 +72,7 @@ get_phase() {
68
72
fi
69
73
}
70
74
get_previous_phase () {
71
- if [[ -f " ${SCALETEST_PHASE_FILE} " ]] && [[ $( wc -l " ${SCALETEST_PHASE_FILE} " | cut -d ' ' -f1 ) -gt 1 ]]; then
75
+ if [[ -f " ${SCALETEST_PHASE_FILE} " ]] && [[ $( grep -c START: " ${SCALETEST_PHASE_FILE} " ) -gt 1 ]]; then
72
76
grep START: " ${SCALETEST_PHASE_FILE} " | tail -n2 | head -n1 | cut -d' ' -f3-
73
77
else
74
78
echo " None"
You can’t perform that action at this time.
0 commit comments