add --verbose
This commit is contained in:
parent
06952c7761
commit
67aa65c3c7
13
urchin
13
urchin
|
@ -260,7 +260,7 @@ report_outcome() {
|
||||||
the_shell='File is not executable.'
|
the_shell='File is not executable.'
|
||||||
fi
|
fi
|
||||||
echo "${not}ok $n - ${path} ($the_shell) ${skip}"
|
echo "${not}ok $n - ${path} ($the_shell) ${skip}"
|
||||||
if [ "$result" = not_ok ]; then
|
if $verbose || [ "$result" = not_ok ]; then
|
||||||
echo '# ------------ Begin output ------------'
|
echo '# ------------ Begin output ------------'
|
||||||
sed 's/^/# /' "$(stdout_file "$abspath" "$the_shell")"
|
sed 's/^/# /' "$(stdout_file "$abspath" "$the_shell")"
|
||||||
echo '# ------------ End output ------------'
|
echo '# ------------ End output ------------'
|
||||||
|
@ -283,12 +283,6 @@ report_outcome() {
|
||||||
# On not_ok, print a red '✗'
|
# On not_ok, print a red '✗'
|
||||||
printf '\033[31m✗ \033[0m'
|
printf '\033[31m✗ \033[0m'
|
||||||
echo "${the_shell} ($file_elapsed $(plural second $file_elapsed))"
|
echo "${the_shell} ($file_elapsed $(plural second $file_elapsed))"
|
||||||
|
|
||||||
# Print output captured from not_ok test in red.
|
|
||||||
printf '\033[31m'
|
|
||||||
|
|
||||||
sed 's/^/ # /' "$(stdout_file "$abspath" "$the_shell")"
|
|
||||||
printf '\033[0m'
|
|
||||||
;;
|
;;
|
||||||
skip)
|
skip)
|
||||||
if test -z "$the_shell"; then
|
if test -z "$the_shell"; then
|
||||||
|
@ -298,6 +292,9 @@ report_outcome() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
if $verbose || test "$result" = not_ok; then
|
||||||
|
sed 's/^/ # /' "$(stdout_file "$abspath" "$the_shell")"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prevpath="$path"
|
prevpath="$path"
|
||||||
|
@ -417,6 +414,7 @@ run_in_series=false
|
||||||
force=false
|
force=false
|
||||||
exit_on_not_ok=false
|
exit_on_not_ok=false
|
||||||
tap_format=false
|
tap_format=false
|
||||||
|
verbose=false
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -443,6 +441,7 @@ you don't need to quote the TEST_SHELL variable." > /dev/stderr
|
||||||
;;
|
;;
|
||||||
-n|--disable-cycling) cycle_shell=false;;
|
-n|--disable-cycling) cycle_shell=false;;
|
||||||
-t|--tap) tap_format=true;;
|
-t|--tap) tap_format=true;;
|
||||||
|
-v|--verbose) verbose=true;;
|
||||||
-h|--help) urchin_help
|
-h|--help) urchin_help
|
||||||
exit 0;;
|
exit 0;;
|
||||||
--version) echo "$VERSION"
|
--version) echo "$VERSION"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user