Allow tracking the start and end time of tests
This commit is contained in:
@@ -7,6 +7,8 @@ green=""
|
||||
yellow=""
|
||||
normal=""
|
||||
|
||||
TESTS_TIMER_LOG=${TESTS_TIMER_LOG:-/dev/null}
|
||||
|
||||
post_run_msg="ran test $1..."
|
||||
if [ -t 1 ]; then
|
||||
red="[31;1m"
|
||||
@@ -17,7 +19,10 @@ fi
|
||||
(cd tests && env ${TESTS_ENVIRONMENT} init.sh 2>/dev/null > /dev/null)
|
||||
|
||||
start_time=$(date -u +%s)
|
||||
echo "$(date -u +%s) $1 start" >> "$TESTS_TIMER_LOG"
|
||||
log="$(cd $(dirname $1) && env ${TESTS_ENVIRONMENT} $(basename $1) 2>&1)"
|
||||
status=$?
|
||||
echo "$(date -u +%s) $1 stop" >> "$TESTS_TIMER_LOG"
|
||||
stop_time=$(date -u +%s)
|
||||
elapsed_time=$(($stop_time-$start_time))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user