git/print-failed-test-output
Todd Zullinger a245ca5676 print-failed-test-output: minor improvements
Drop the subshell used to create the string of dashes (and rename the
variable to "sep" at the same time).  Replace $(cat file) with the
equivalent but faster $(< file).
2019-02-11 22:47:30 -05:00

14 lines
307 B
Bash

#!/bin/bash
shopt -s failglob
# Print output from failing tests
printf -v sep "%0.s-" {1..80}
for exit_file in t/test-results/*.exit; do
[ "$(< "$exit_file")" -eq 0 ] && continue
out_file="${exit_file%exit}out"
printf '\n%s\n%s\n%s\n' "$sep" "$out_file" "$sep"
cat "$out_file"
done
exit 1