To make CI output not too long - output only header of every test set
and output only relevant log entries on test failures.
When `CI' env is defined. Which should be defined for both Travis and
Cirrus. Reference:
https://docs.travis-ci.com/user/environment-variables/
https://cirrus-ci.org/guide/writing-tasks/#environment-variables
exit $fail
fi
for t in $BASE_TESTS; do
- $TCLSH $t.try || fail=1
+ if [ "$CI" ]; then
+ if $TCLSH $t.try > $TESTDIR/$t.out 2>&1; then
+ head -1 $TESTDIR/$t.out
+ else
+ fail=1
+ cat $TESTDIR/$t.out
+ echo "=== Output failures of $TESTDIR/$t.log ==="
+ awk "/ ends failed/" RS= ORS='\n\n' $TESTDIR/$t.log |
+ sed 's/^/\t/'
+ echo "=== End of $TESTDIR/$t.log ==="
+ exit 1
+ fi
+ else
+ $TCLSH $t.try || fail=1
+ fi
done
if false; then # ignore some tests for a time