printf "Finished running ${type} plans\n"
} # function run_plan()
+# Return elapsed time. Usage:
+# - Call first time with no arguments and a new timer is returned.
+# - Next call with the first argument as the timer and the elapsed time is returned.
+function timer()
+{
+ if [ $# -eq 0 ]; then
+ # return the current time
+ printf "$(date "+%s")"
+ else
+ local start_time=$1
+ end_time=$(date "+%s")
+
+ if [ -z "$start_time" ]; then
+ start_time=$end_time;
+ fi
+
+ delta_time=$((end_time - start_time))
+ ds=$((delta_time % 60))
+ dm=$(((delta_time / 60) % 60))
+ dh=$((delta_time / 3600))
+ # return the elapsed time
+ printf "%d:%02d:%02d" $dh $dm $ds
+ fi
+}
+
# convert commas in csv strings to spaces (ssv)
function csv2ssv() {
local csv=$1
# shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
source ${ROBOT_VENV}/bin/activate
source /tmp/common-functions.sh ${BUNDLEFOLDER}
-
+totaltmr=$(timer)
# Ensure we fail the job if any steps fail.
set -ex -o pipefail
which neutron
neutron --version
+stacktime=$(timer $totaltmr)
+printf "Stacking elapsed time: %s\n" "${stacktime}"
+
echo "Starting Robot test suites ${SUITES} ..."
# please add pybot -v arguments on a single line and alphabetized
suite_num=0
ssh ${ODL_SYSTEM_IP} "du -hs /tmp/${BUNDLEFOLDER}/data/log/*"
echo "Tests Executed"
-
+printf "Total elapsed time: %s, stacking time: %s\n" "$(timer $totaltmr)" "${stacktime}"
true # perhaps Jenkins is testing last exit code
# vim: ts=4 sw=4 sts=4 et ft=sh :