From 1e606b8a6179da1e3071a3fd20cd4938049bdee8 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 24 Jan 2019 12:18:28 +0100 Subject: [PATCH] travis: print cppcheck's output to stdout This prevents Travis from believing that an error has occurred after 10 minutes without output. Capture error messages in a file and print its content after cppcheck has finished. Exit the script with cppcheck's exit code. Thanks @turol for your help with this! --- .travis.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.sh b/.travis.sh index 04d32dfb..9f76962d 100755 --- a/.travis.sh +++ b/.travis.sh @@ -1,8 +1,14 @@ #!/bin/sh -set -e if [ "$ANALYZE" = "true" ] ; then - cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen > /dev/null + cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen 2> stderr.txt + RET=$? + if [ -s stderr.txt ] + then + cat stderr.txt + fi + exit $RET else + set -e ./autogen.sh --enable-werror make make install DESTDIR=/tmp/whatever