From dc9f5c72cb5f160cb2e486d438981d2f8b1ee2ea Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 21 Oct 2016 11:04:10 +0200 Subject: [PATCH] test: make source code checks more verbose --- build/autotools/common.am | 7 +++++++ build/check-source.sh | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build/autotools/common.am b/build/autotools/common.am index e7b4970c..77c8c97d 100644 --- a/build/autotools/common.am +++ b/build/autotools/common.am @@ -27,6 +27,13 @@ lolcheck: lolcheck-recursive lolcheck-recursive: $(lol_recursive_rule) +# +# Make tests verbose +# FIXME: this does not seem to work as documented +# + +AM_TESTS_FD_REDIRECT = 9>&2 + # # .lolfx build rule diff --git a/build/check-source.sh b/build/check-source.sh index a08e4864..81b11fba 100755 --- a/build/check-source.sh +++ b/build/check-source.sh @@ -18,15 +18,15 @@ while [ "$#" -gt 0 ]; do quiet=true ;; *) - echo "E: invalid argument $1" + echo "E: invalid argument $1" >&2 exit 1 ;; esac shift done -error() { if [ "$quiet" != true ]; then echo "E: $1"; fi } -info() { if [ "$quiet" != true ]; then echo "I: $1"; fi } +error() { if [ "$quiet" != true ]; then echo "E: $1" >&2; fi } +info() { if [ "$quiet" != true ]; then echo "I: $1" >&2; fi } # Ensure the system tools do not attempt to perform multibyte conversions export LANG=C @@ -191,6 +191,7 @@ if [ "$total_errors" -gt 0 ]; then else # OR: warn about how to fix errors info "re-run with -w to fix errors" + exit 1 fi else info "all $total_files source files appear to be OK, congratulations"