Commit 21d2dac7 authored by Jim Harris's avatar Jim Harris Committed by Daniel Verkamp
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Id3030d26e65c6c633b61855754e93b8b0b38b263
Reviewed-on: https://review.gerrithub.io/415873


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent d5e76d83
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -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