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 ...@@ -20,15 +20,20 @@ else
CRESET= CRESET=
fi fi
ERRORS=$(make -C "${RIOTBASE}" doc 2>&1 | \ DOXY_OUTPUT=$(make -C "${RIOTBASE}" doc 2>&1)
grep '.*warning' | \ DOXY_ERRCODE=$?
sed "s#${PWD}/\([^:]*\)#\1#g")
if [ -n "${ERRORS}" ] if [ "${DOXY_ERRCODE}" -ne 0 ] ; then
then echo "'make doc' exited with non-zero code (${DOXY_ERRCODE})"
echo -e "${CERROR}ERROR: Doxygen generates the following warnings:${CRESET}" echo "${DOXY_OUTPUT}"
echo "${ERRORS}"
exit 2 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 fi
exclude_filter() { exclude_filter() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment