Permalink
Browse files

Make the test failure output more readable

When the test failure output only had the failing test name it made
sense to have the lines numbered.  Now that the test error messages are
also in the failure list, the line numbering is confusing and hard to
read.  This gets rid of line numbering and replaces it with test
numbering, spaces out the failure results and moves the summary to the
end.
  • Loading branch information...
Matt Robinson
Matt Robinson committed Sep 14, 2010
1 parent 81e0e95 commit a4affb95f653b788ce0db8dbda823789d06c4e88
Showing with 5 additions and 3 deletions.
  1. +5 −3 puppet_spec.sh
View
@@ -14,6 +14,8 @@ set -u
: ${TEST_DIR:=${1:-'./spec'}}
print_results() {
+ echo
+ cat $FAIL_LOG
echo
echo -n "$TOTAL tests, $FAILURES failures"
if [ "$PENDING" -ne 0 ] ; then
@@ -23,7 +25,6 @@ print_results() {
echo -n ", $SKIPPED skipped"
fi
echo
- cat -n $FAIL_LOG
}
trap "print_results; exit" SIGINT
@@ -63,9 +64,10 @@ for SPEC in $(find $TEST_DIR -name '*_spec.sh' | sort) ; do
echo -n '~'
((SKIPPED++))
else
- echo $SPEC >> $FAIL_LOG
- echo $result >> $FAIL_LOG
((FAILURES++))
+ echo "$FAILURES) $SPEC" >> $FAIL_LOG
+ echo $result >> $FAIL_LOG
+ echo >> $FAIL_LOG
echo -n F
fi
fi

0 comments on commit a4affb9

Please sign in to comment.