diff options
| author | kinichiro <kinichiro.inoguchi@gmail.com> | 2021-05-15 01:25:18 +0900 |
|---|---|---|
| committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2021-05-19 21:44:54 +0900 |
| commit | dcad94bbc08718774608360ce160e4593bd2fa56 (patch) | |
| tree | 5eb1c1ab3d34d0c359d1b1b09db7230116294b6f | |
| parent | 66e8b10e530c2e1d38e0c4fce0aa427e634a3553 (diff) | |
| download | portable-dcad94bbc08718774608360ce160e4593bd2fa56.tar.gz portable-dcad94bbc08718774608360ce160e4593bd2fa56.tar.bz2 portable-dcad94bbc08718774608360ce160e4593bd2fa56.zip | |
Add after_failure script to show failed test log
| -rw-r--r-- | .travis.yml | 3 | ||||
| -rwxr-xr-x | scripts/travis_failure | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 3e50e18..12e1d56 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -62,3 +62,6 @@ matrix: | |||
| 62 | 62 | ||
| 63 | script: | 63 | script: |
| 64 | "./scripts/travis" | 64 | "./scripts/travis" |
| 65 | |||
| 66 | after_failure: | ||
| 67 | "./scripts/travis_failure" | ||
diff --git a/scripts/travis_failure b/scripts/travis_failure new file mode 100755 index 0000000..93354fd --- /dev/null +++ b/scripts/travis_failure | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | CWD=`pwd` | ||
| 4 | |||
| 5 | testsdir=`ls -d libressl-*/_build/sub/tests` | ||
| 6 | if [ -d "$testsdir" ] ; then | ||
| 7 | echo "##### test logs in $testsdir" | ||
| 8 | cd $testsdir | ||
| 9 | for i in `ls *.trs` ; do | ||
| 10 | grep ':test-result: PASS' $i > /dev/null | ||
| 11 | if [ $? -eq 1 ] ; then | ||
| 12 | log=`echo $i | sed 's/\.trs$/\.log/'` | ||
| 13 | echo "***** $log" | ||
| 14 | cat $log | ||
| 15 | fi | ||
| 16 | done | ||
| 17 | cd $CWD | ||
| 18 | fi | ||
