Fixes deprecated arithmetic expansion for bashate
$[...] is deprecated for $((...)) Change-Id: I432b6af3a04e4bb2196c53be84375a2653ae6a30
This commit is contained in:
parent
928ffa071d
commit
46a1638480
@ -49,7 +49,7 @@ function successerator() {
|
|||||||
exit_fail
|
exit_fail
|
||||||
fi
|
fi
|
||||||
# Print the time that the method completed.
|
# Print the time that the method completed.
|
||||||
OP_TOTAL_SECONDS="$[$(date +%s) - $OP_START_TIME]"
|
OP_TOTAL_SECONDS="$(( $(date +%s) - $OP_START_TIME ))"
|
||||||
REPORT_OUTPUT="${OP_TOTAL_SECONDS} seconds"
|
REPORT_OUTPUT="${OP_TOTAL_SECONDS} seconds"
|
||||||
REPORT_DATA+="- Operation: [ $@ ]\t${REPORT_OUTPUT}\tNumber of Attempts [ ${RETRY} ]\n"
|
REPORT_DATA+="- Operation: [ $@ ]\t${REPORT_OUTPUT}\tNumber of Attempts [ ${RETRY} ]\n"
|
||||||
echo -e "Run Time = ${REPORT_OUTPUT}"
|
echo -e "Run Time = ${REPORT_OUTPUT}"
|
||||||
@ -173,7 +173,7 @@ function loopback_create() {
|
|||||||
|
|
||||||
function exit_state() {
|
function exit_state() {
|
||||||
set +x
|
set +x
|
||||||
TOTALSECONDS="$[$(date +%s) - $STARTTIME]"
|
TOTALSECONDS="$(( $(date +%s) - $STARTTIME ))"
|
||||||
info_block "Run Time = ${TOTALSECONDS} seconds || $(($TOTALSECONDS / 60)) minutes"
|
info_block "Run Time = ${TOTALSECONDS} seconds || $(($TOTALSECONDS / 60)) minutes"
|
||||||
if [ "${1}" == 0 ];then
|
if [ "${1}" == 0 ];then
|
||||||
info_block "Status: Success"
|
info_block "Status: Success"
|
||||||
|
2
tox.ini
2
tox.ini
@ -28,4 +28,4 @@ commands =
|
|||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
-not -path '*/\.*' \ # stay out of the dot directories
|
-not -path '*/\.*' \ # stay out of the dot directories
|
||||||
-name '*sh' \ # all shell scripts please
|
-name '*sh' \ # all shell scripts please
|
||||||
-print0 | xargs -0 bashate -v -i E003,E010,E011,E020,E041"
|
-print0 | xargs -0 bashate -v -i E003,E010,E011,E020"
|
||||||
|
Loading…
Reference in New Issue
Block a user