Change build.sh to use less verbose output for verification

This commit is contained in:
Ethan P 2020-04-01 15:35:23 -07:00
parent 06746d0e24
commit b08128e550
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA
2 changed files with 22 additions and 3 deletions

@ -1 +1 @@
Subproject commit d435022a4e579f877408beee52fd42a94735c4a1
Subproject commit 527a57d07ac44d0d2f602b6f14a7bd3c4bd7fc8d

View File

@ -314,6 +314,25 @@ done
if "$OPT_VERIFY"; then
printc "\n%{YELLOW}Verifying scripts...%{CLEAR}\n" 1>&2
"${HERE}/test.sh" --compiled
exit $?
# Run the tests.
FAIL=0
while read -r action data1 data2 splat; do
[[ "$action" == "result" ]] || continue
printf "\x1B[G\x1B[K%s" "$data1" 1>&2
if [[ "$data2" == "fail" ]]; then
printf " failed.\n" 1>&2
((FAIL++)) || true
fi
done < <("${HERE}/test.sh" --compiled --porcelain)
# Print the overall result.
if [[ "$FAIL" -ne 0 ]]; then
printc "%{RED}One or more tests failed.\n" 1>&2
printc "Run ./test.sh for more detailed information.%{CLEAR}\n" 1>&2
exit 1
fi
printc "\x1B[G\x1B[K%{YELLOW}Verified successfully.%{CLEAR}\n" 1>&2
fi