Skip to content
Snippets Groups Projects
Commit ae4cecd1 authored by Juan Carrano's avatar Juan Carrano
Browse files

tools/doccheck: Detect when `make doc` fails to run.

The previous doccheck would give a false negative when doxygen does
not even run (for example, because of misconfiguration).

Also, when doxygen fails to run, print the full output.
parent 79b0a550
No related branches found
No related tags found
No related merge requests found
......@@ -20,15 +20,20 @@ else
CRESET=
fi
ERRORS=$(make -C "${RIOTBASE}" doc 2>&1 | \
grep '.*warning' | \
sed "s#${PWD}/\([^:]*\)#\1#g")
DOXY_OUTPUT=$(make -C "${RIOTBASE}" doc 2>&1)
DOXY_ERRCODE=$?
if [ -n "${ERRORS}" ]
then
echo -e "${CERROR}ERROR: Doxygen generates the following warnings:${CRESET}"
echo "${ERRORS}"
if [ "${DOXY_ERRCODE}" -ne 0 ] ; then
echo "'make doc' exited with non-zero code (${DOXY_ERRCODE})"
echo "${DOXY_OUTPUT}"
exit 2
else
ERRORS=$(echo "${DOXY_OUTPUT}" | grep '.*warning' | sed "s#${PWD}/\([^:]*\)#\1#g")
if [ -n "${ERRORS}" ] ; then
echo -e "${CERROR}ERROR: Doxygen generates the following warnings:${CRESET}"
echo "${ERRORS}"
exit 2
fi
fi
exclude_filter() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment