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!
This commit is contained in:
Fabian Greffrath 2019-01-24 12:18:28 +01:00
parent 2880809db9
commit 1e606b8a61

View file

@ -1,8 +1,14 @@
#!/bin/sh #!/bin/sh
set -e
if [ "$ANALYZE" = "true" ] ; then 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 else
set -e
./autogen.sh --enable-werror ./autogen.sh --enable-werror
make make
make install DESTDIR=/tmp/whatever make install DESTDIR=/tmp/whatever