From 21d2dac7eebd8fb3b362808a4a6ceee5d9d174b0 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 18 Jun 2018 07:59:53 -0700 Subject: [PATCH] autobuild.sh: fail build if Doxygen warnings found We could set WARN_AS_ERROR = YES, but that will just bail when the first error is found. So instead just fail the build in autobuild.sh and the submitter can look at doxygen.log to see what went wrong. Also change how doc make output is redirected to doxygen.log, so that the commands show up in the main build log instead of doxygen.log. That makes sure we can treat an empty doxygen.log file as a successful test. Signed-off-by: Jim Harris Change-Id: Id3030d26e65c6c633b61855754e93b8b0b38b263 Reviewed-on: https://review.gerrithub.io/415873 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Daniel Verkamp --- autobuild.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 99bb7d7e5..ac0994485 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -107,16 +107,24 @@ timing_exit make_install timing_enter doxygen if [ $SPDK_BUILD_DOC -eq 1 ] && hash doxygen; then - (cd "$rootdir"/doc; $MAKE $MAKEFLAGS) &> "$out"/doxygen.log + $MAKE -C "$rootdir"/doc --no-print-directory $MAKEFLAGS &> "$out"/doxygen.log + if [ -s "$out"/doxygen.log ]; then + cat "$out"/doxygen.log + echo "Doxygen errors found!" + exit 1 + fi if hash pdflatex; then - (cd "$rootdir"/doc/output/latex && $MAKE $MAKEFLAGS) &>> "$out"/doxygen.log + $MAKE -C "$rootdir"/doc/output/latex --no-print-directory $MAKEFLAGS &>> "$out"/doxygen.log fi mkdir -p "$out"/doc mv "$rootdir"/doc/output/html "$out"/doc if [ -f "$rootdir"/doc/output/latex/refman.pdf ]; then mv "$rootdir"/doc/output/latex/refman.pdf "$out"/doc/spdk.pdf fi - (cd "$rootdir"/doc; $MAKE $MAKEFLAGS clean) &>> "$out"/doxygen.log + $MAKE -C "$rootdir"/doc --no-print-directory $MAKEFLAGS clean &>> "$out"/doxygen.log + if [ -s "$out"/doxygen.log ]; then + rm "$out"/doxygen.log + fi rm -rf "$rootdir"/doc/output fi timing_exit doxygen