build: Print failed tests to STDERR instead of STDOUT

This commit is contained in:
Ethan P 2020-05-12 21:54:55 -07:00
parent f20a3ff9b8
commit 43ddb984f5
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -462,10 +462,10 @@ if "$OPT_VERIFY"; then
while read -r action data1 data2 splat; do while read -r action data1 data2 splat; do
[[ "$action" == "result" ]] || continue [[ "$action" == "result" ]] || continue
printc_err "\x1B[G\x1B[K%s" "$data1" printc_msg "\x1B[G\x1B[K%s" "$data1"
case "$data2" in case "$data2" in
fail) fail)
printc_err " failed.\n" printc_err "\x1B[G\x1B[K%s failed.\n" "$data1"
((FAIL++)) || true ((FAIL++)) || true
;; ;;
@ -479,8 +479,9 @@ if "$OPT_VERIFY"; then
printc_msg "\x1B[G\x1B[K" printc_msg "\x1B[G\x1B[K"
if [[ "$FAIL" -ne 0 ]]; then if [[ "$FAIL" -ne 0 ]]; then
printc_err "%{RED}One or more tests failed.\n" printc_err "%{RED}%s\n" "One or more tests failed."
printc_err "Run ./test.sh for more detailed information.%{CLEAR}\n" printc_msg "\x1B[A\x1B[G\x1B[K%{RED}%s\n" "One or more tests failed."
printc_err "%{RED}%s%{CLEAR}\n" "Run ./test.sh for more detailed information."
exit 1 exit 1
fi fi