@@ -673,7 +673,7 @@ elif [ -z "$SKIP_FIO" ]; then
673673 JSON_RESULT+=' ,"speed_w":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+2]} ' ,"iops_w":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+5]} ' ,"speed_rw":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6]}
674674 JSON_RESULT+=' ,"iops_rw":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+3]} ' ,"speed_units":"KBps"},'
675675 fi
676- DISK_COUNT=$(( $ DISK_COUNT + 2 ))
676+ DISK_COUNT=$(( DISK_COUNT + 2 ))
677677 done
678678 [[ -n $JSON ]] && JSON_RESULT=${JSON_RESULT:: ${# JSON_RESULT} -1} && JSON_RESULT+=' ]'
679679 fi
@@ -982,7 +982,7 @@ function launch_geekbench {
982982
983983# if the skip geekbench flag was set, skip the system performance test, otherwise test system performance
984984if [ -z " $SKIP_GEEKBENCH " ]; then
985- [[ -n $JSON ]] && JSON_RESULT+=( " ,\" geekbench\" :[" )
985+ [[ -n $JSON ]] && JSON_RESULT+=" ,\" geekbench\" :["
986986 if [[ $GEEKBENCH_4 == * True* ]]; then
987987 launch_geekbench 4
988988 fi
@@ -994,8 +994,8 @@ if [ -z "$SKIP_GEEKBENCH" ]; then
994994 if [[ $GEEKBENCH_6 == * True* ]]; then
995995 launch_geekbench 6
996996 fi
997- [[ -n $JSON ]] && [[ " ${JSON_RESULT: -1} " == ' ,' ]] && JSON_RESULT=$( echo " $ JSON_RESULT" | sed ' s/,$// ' )
998- [[ -n $JSON ]] && JSON_RESULT+=' ] '
997+ [[ -n $JSON ]] && [[ " ${JSON_RESULT: -1} " == ' ,' ]] && JSON_RESULT=" ${ JSON_RESULT% ,} "
998+ [[ -n $JSON ]] && JSON_RESULT+=" ] "
999999fi
10001000
10011001# finished all tests, clean up all YABS files and exit
@@ -1021,13 +1021,13 @@ function calculate_time_taken() {
10211021 else
10221022 echo " YABS completed in ${time_taken} sec"
10231023 fi
1024- [[ -n $JSON ]] && JSON_RESULT+=' , "runtime":{"start":' $start_time ' ,"end":' $end_time ' ,"elapsed":' $time_taken ' }'
1024+ [[ -n $JSON ]] && JSON_RESULT+=" , \ " runtime\ " :{\ " start\ " :'$start_time ',\ " end\ " :'$end_time ',\ " elapsed\ " :'$time_taken '}"
10251025}
10261026
10271027calculate_time_taken " $YABS_END_TIME " " $YABS_START_TIME "
10281028
10291029if [[ -n $JSON ]]; then
1030- JSON_RESULT+=' } '
1030+ JSON_RESULT+=" } "
10311031
10321032 # write json results to file
10331033 if [[ $JSON = * w* ]]; then
0 commit comments