trying to use time

This commit is contained in:
Thomas Levine 2016-04-07 02:15:45 +00:00
parent 539027db59
commit fae4c7025e

27
urchin
View File

@ -347,11 +347,9 @@ report_outcome() {
root="${1}" root="${1}"
tap_format="${2}" tap_format="${2}"
log_file="${3}" log_file="${3}"
start="${4}" elapsed="${4}"
finish="${5}"
escaped_root="$(fullpath "${root}" | sed 's/\//\\\//g')" escaped_root="$(fullpath "${root}" | sed 's/\//\\\//g')"
elapsed=$(($finish - $start))
if "${tap_format}"; then if "${tap_format}"; then
printf \#\ printf \#\
@ -707,17 +705,18 @@ main() {
fi fi
# -------------------- REALLY RUN -------------------- # # -------------------- REALLY RUN -------------------- #
start=$(date +%s) elapsed=$({
time {
# 1 test file or folder to run # 1 test file or folder to run
# 2 urchin root # 2 urchin root
# 3 Should we cycle shells? # 3 Should we cycle shells?
# 4 TEST_SHELL # 4 TEST_SHELL
while read seed; do while read seed; do
recurse "$(fullpath "${seed}")" "${root}" "${cycle_shell}" \ recurse "$(fullpath "${seed}")" "${root}" "${cycle_shell}" \
"${TEST_SHELL}" || break "${TEST_SHELL}" || break
done < "${test_arg_list}" done < "${test_arg_list}"
finish=$(date +%s) }
} 3>&1 1>&2 2>&3 3>& | grep ^real | cut -f 2)
if test $(cat "${urchin_tmp}"/log | wc -l) -eq 0; then if test $(cat "${urchin_tmp}"/log | wc -l) -eq 0; then
echo 'No tests found' >&2 echo 'No tests found' >&2