Skip to content

Commit c2e704b

Browse files
thomas.desaintexuperytarleb
authored andcommitted
Add beautiful output for tests
1 parent 81020d0 commit c2e704b

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

runtests.sh

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,28 @@
22
# argument is list of filters
33

44
FILTERS=$*
5+
6+
ERRORS_COUNT=0
7+
PASSED_COUNT=0
8+
SKIPPED_COUNT=0
9+
EXPECTED_COUNT=0
10+
511
let err=0
6-
for d in $FILTERS ; do
7-
make --no-print-directory -C $d test
8-
if [ $? -eq 0 ]; then
9-
echo "PASS $d"
10-
else
11-
echo "FAIL $d"
12-
err=1
13-
fi
12+
13+
for d in $FILTERS; do
14+
let "EXPECTED_COUNT++"
15+
make --no-print-directory -C $d test
16+
if [ $? -eq 0 ]; then
17+
let "PASSED_COUNT++"
18+
echo "$d"
19+
else
20+
let "ERRORS_COUNT++"
21+
echo "$d"
22+
fi
1423
done
15-
exit $err
1624

25+
echo ""
26+
echo "⚖ Summary"
27+
echo "${PASSED_COUNT} passed"
28+
[ ${ERRORS_COUNT} = 0 ] || echo "${ERRORS_COUNT} errors"
29+
exit ${ERRORS_COUNT}

0 commit comments

Comments
 (0)