git/SOURCES/print-failed-test-output

14 lines
325 B
Plaintext
Raw Normal View History

2019-11-05 19:44:09 +00:00
#!/bin/bash
shopt -s failglob
# Print output from failing tests
dashes=$(printf "%80s" '' | tr ' ' '-')
for exit_file in t/test-results/*.exit; do
[ "$(cat "$exit_file")" -eq 0 ] && continue
out_file="${exit_file%exit}out"
printf '\n%s\n%s\n%s\n' "$dashes" "$out_file" "$dashes"
cat "$out_file"
done
exit 1