X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Fentry%2Fcheck%2Fdoc_verify.sh;fp=resources%2Flibraries%2Fbash%2Fentry%2Fcheck%2Fdoc_verify.sh;h=baa9d8aa74802f8e94150c2f527ade3d5957d4a4;hp=544586a7670e89322fa32ca4a0effb3313dca12f;hb=aa72d4256fb7409fa01a0cb33aaa763128f0d30b;hpb=c849edfc256df9c3de1ece6babcd4757bb2a8072 diff --git a/resources/libraries/bash/entry/check/doc_verify.sh b/resources/libraries/bash/entry/check/doc_verify.sh index 544586a767..baa9d8aa74 100644 --- a/resources/libraries/bash/entry/check/doc_verify.sh +++ b/resources/libraries/bash/entry/check/doc_verify.sh @@ -27,14 +27,9 @@ source "${BASH_FUNCTION_DIR}/common.sh" || { echo "Source failed." >&2 exit 1 } - +source "${BASH_FUNCTION_DIR}/docs.sh" || die "Source failed." common_dirs || die -log_file="$(pwd)/doc_verify.log" || die - -# Pre-cleanup. -rm -f "${log_file}" || die -rm -f "${DOC_GEN_DIR}/csit.docs.tar.gz" || die -rm -rf "${DOC_GEN_DIR}/_build" || die +activate_virtualenv || die # Documentation generation. # Here we do store only stderr to file while stdout (inlcuding Xtrace) is @@ -43,13 +38,12 @@ rm -rf "${DOC_GEN_DIR}/_build" || die # task. exec 3>&1 || die export BASH_XTRACEFD="3" || die +log_file="$(pwd)/doc_verify.log" || die -pushd "${DOC_GEN_DIR}" || die -source ./run_doc.sh ${GERRIT_BRANCH:-local} 2> ${log_file} || true -popd || die +generate_docs 2> ${log_file} || die -if [[ ! -f "${log_file}" ]] || [[ -s "${log_file}" ]]; then - # Output file not exists or is non empty. +if [[ "${DOCS_EXIT_STATUS}" != 0 ]]; then + # Failed to generate report. warn warn "Doc verify checker: FAIL" exit 1