aboutsummaryrefslogtreecommitdiff
path: root/tcl_tests
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2020-01-05 23:51:09 +0300
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2020-01-12 00:20:37 +0300
commit07743c1340bebbaba78525d0d22c9104732c3f1d (patch)
tree866570389bcefe8433c34487216904e212542297 /tcl_tests
parent1d36903aadb45850650e8113c6367893140d40af (diff)
downloadgost-engine-07743c1340bebbaba78525d0d22c9104732c3f1d.zip
gost-engine-07743c1340bebbaba78525d0d22c9104732c3f1d.tar.gz
gost-engine-07743c1340bebbaba78525d0d22c9104732c3f1d.tar.bz2
tcl_tests: Abbreviate output when run under CI
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
Diffstat (limited to 'tcl_tests')
-rw-r--r--tcl_tests/runtest.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/tcl_tests/runtest.sh b/tcl_tests/runtest.sh
index a9714fd..9e0dead 100644
--- a/tcl_tests/runtest.sh
+++ b/tcl_tests/runtest.sh
@@ -120,7 +120,21 @@ if [ "$*" ]; then
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