From 75aaaa6bd945717c8c271603c3cad83aadc048e2 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 19 Dec 2019 17:57:32 -0700 Subject: [PATCH] autobuild: move build_doc under run_test. Change-Id: I3808305681df2da7faf215a88045949e6a1a0b4d Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478551 Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Paul Luse Reviewed-by: Karol Latecki Tested-by: SPDK CI Jenkins --- autobuild.sh | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index a43b508b6d..fa516656a3 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -92,6 +92,28 @@ function test_make_uninstall { fi } +function build_doc { + $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 2>/dev/null; then + $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 + $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 +} + if [ $SPDK_RUN_VALGRIND -eq 1 ]; then run_test "valgrind" echo "using valgrind" fi @@ -129,30 +151,8 @@ run_test "autobuild_generated_files_check" porcelain_check run_test "autobuild_header_dependency_check" header_dependency_check run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr run_test "autobuild_make_uninstall" test_make_uninstall - - -timing_enter doxygen if [ $SPDK_BUILD_DOC -eq 1 ] && hash doxygen; then - $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 2>/dev/null; then - $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 - $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 + run_test "autobuild_build_doc" build_doc fi -timing_exit doxygen timing_exit autobuild