From 90b2f93de6973ff9d04f36377cc4d6343f44e259 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Fri, 8 Apr 2016 06:56:22 +0000 Subject: [PATCH] output format to support remotes --- urchin | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/urchin b/urchin index f8a8972..7ee853b 100755 --- a/urchin +++ b/urchin @@ -356,13 +356,15 @@ report_outcome() { escaped_root="$(fullpath "${root}" | sed 's/\//\\\//g')" elapsed=$(($finish - $start)) - if "${tap_format}"; then - printf \#\ - fi if "${print_margins}" || "${tap_format}"; then - echo Running tests at $(date +%Y-%m-%dT%H:%M:%S) + if $tap_format; then printf \#\ ; fi + echo Ran tests at $(date +%Y-%m-%dT%H:%M:%S) with the following shells: + if $tap_format; then printf \#\ ; fi + cat "${shell_list}" | tr '\n' \ + echo fi + for number in n oks skips not_oks; do eval "${number}=0" done @@ -697,15 +699,6 @@ main() { fi fi - if $print_margins; then - if $tap_format; then - printf '# ' - fi - printf 'Cycling with the following shells: ' - cat "${shell_list}" | tr '\n' \ - echo - fi - if test -n "${urchin_timeout}"; then # Choose the timeout command if timeout -t 0 true 2> /dev/null; then @@ -741,9 +734,13 @@ main() { urchin_exit 1 fi - report_outcome "${root}" "${tap_format}" "${urchin_tmp}"/log "${start}" \ - "${finish}" - urchin_exit "${?}" + if test -n "${RUNNING_ON_REMOTE}"; then + cat "${urchin_tmp}"/log + else + report_outcome "${root}" "${tap_format}" "${urchin_tmp}"/log \ + "${start}" "${finish}" + urchin_exit "${?}" + fi } test -n "${TESTING_URCHIN_INTERNALS}" || main "$@"