mbed TLS Build
tests/scripts/travis-log-failure.sh@1:1a219dea6cb5, 2019-06-04 (annotated)
- Committer:
- williequesada
- Date:
- Tue Jun 04 16:03:38 2019 +0000
- Revision:
- 1:1a219dea6cb5
- Parent:
- 0:cdf462088d13
compartir a Pablo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
markrad | 0:cdf462088d13 | 1 | #!/bin/sh |
markrad | 0:cdf462088d13 | 2 | |
markrad | 0:cdf462088d13 | 3 | # travis-log-failure.sh |
markrad | 0:cdf462088d13 | 4 | # |
markrad | 0:cdf462088d13 | 5 | # This file is part of mbed TLS (https://tls.mbed.org) |
markrad | 0:cdf462088d13 | 6 | # |
markrad | 0:cdf462088d13 | 7 | # Copyright (c) 2016, ARM Limited, All Rights Reserved |
markrad | 0:cdf462088d13 | 8 | # |
markrad | 0:cdf462088d13 | 9 | # Purpose |
markrad | 0:cdf462088d13 | 10 | # |
markrad | 0:cdf462088d13 | 11 | # List the server and client logs on failed ssl-opt.sh and compat.sh tests. |
markrad | 0:cdf462088d13 | 12 | # This script is used to make the logs show up in the Travis test results. |
markrad | 0:cdf462088d13 | 13 | # |
markrad | 0:cdf462088d13 | 14 | # Some of the logs can be very long: this means usually a couple of megabytes |
markrad | 0:cdf462088d13 | 15 | # but it can be much more. For example, the client log of test 273 in ssl-opt.sh |
markrad | 0:cdf462088d13 | 16 | # is more than 630 Megabytes long. |
markrad | 0:cdf462088d13 | 17 | |
markrad | 0:cdf462088d13 | 18 | if [ -d include/mbedtls ]; then :; else |
markrad | 0:cdf462088d13 | 19 | echo "$0: must be run from root" >&2 |
markrad | 0:cdf462088d13 | 20 | exit 1 |
markrad | 0:cdf462088d13 | 21 | fi |
markrad | 0:cdf462088d13 | 22 | |
markrad | 0:cdf462088d13 | 23 | FILES="o-srv-*.log o-cli-*.log c-srv-*.log c-cli-*.log o-pxy-*.log" |
markrad | 0:cdf462088d13 | 24 | MAX_LOG_SIZE=1048576 |
markrad | 0:cdf462088d13 | 25 | |
markrad | 0:cdf462088d13 | 26 | for PATTERN in $FILES; do |
markrad | 0:cdf462088d13 | 27 | for LOG in $( ls tests/$PATTERN 2>/dev/null ); do |
markrad | 0:cdf462088d13 | 28 | echo |
markrad | 0:cdf462088d13 | 29 | echo "****** BEGIN file: $LOG ******" |
markrad | 0:cdf462088d13 | 30 | echo |
markrad | 0:cdf462088d13 | 31 | tail -c $MAX_LOG_SIZE $LOG |
markrad | 0:cdf462088d13 | 32 | echo "****** END file: $LOG ******" |
markrad | 0:cdf462088d13 | 33 | echo |
markrad | 0:cdf462088d13 | 34 | rm $LOG |
markrad | 0:cdf462088d13 | 35 | done |
markrad | 0:cdf462088d13 | 36 | done |