tools/doccheck: Detect when make doc fails to run.#9819
tools/doccheck: Detect when make doc fails to run.#9819jcarrano merged 1 commit intoRIOT-OS:masterfrom
make doc fails to run.#9819Conversation
|
that was fast :) I'm currently trying the script |
dist/tools/doccheck/check.sh
Outdated
| RIOTBASE="$(cd $(dirname $0)/../../..; pwd)" | ||
|
|
||
| die() { | ||
| echo "warning: Failed to build run doxygen" |
There was a problem hiding this comment.
these error messages can come from the Doxygen makefile. E.g there might be a "doxygen not found" or a "git-lfs not installed", they are 2 different errors
There was a problem hiding this comment.
The idea of this PR was to catch any non-zero exit code from make doc. Maybe I can change the message to "make doc exited with non-zero code" to make it explicit.
Afterwards we could add filters to point at the cause of the problem.
|
besides the comment I just made, the script is running as expected. Great! |
|
(Travis fails, the error seems to be triggered there) |
Weird. It works on my machine. Could it be that |
If I remember correctly I have seen Doxygen errors, not sure where (Travis CI or Murdock) . I will try the Docker image to see if it works. |
I already noticed related problems in previous PRs where Murdock was reporting doxygen errors (undocumented paramaters, etc) but not Travis. I thought that doxygen version was the culprit and didn't look at that too much. |
5b3f873 to
96e9927
Compare
|
@jia200x Is this PR still relevant or has it been solved in another one? |
|
AFAIK the issue is still present |
e564137 to
a37c56e
Compare
|
Update: the problem was Travis and it's outdated lesscpy command. I did another PR to fix it. |
|
How about moving travis configuration to xenial (instead of trusty) ? |
|
@aabadie why not updating it directly to the new bionic docker image after the release when we use it in |
Easy, have a look at #8729. But it requires to move to CircleCI => which provides a nice container environment. |
|
Can we first update and then move to CircleCI? I'm sure it won't be without inconveniences. Then we would have the problems that come from updating ubuntu and changing CI all at the same time. |
|
Can we not use our image in But sure using the latest version on |
Apparently yes, see https://docs.travis-ci.com/user/docker/ |
EDIT: I provided a PR to use our own image in travis. |
a37c56e to
bf06240
Compare
db82f40 to
d920c6e
Compare
d920c6e to
ae4cecd
Compare
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.
cladmi
left a comment
There was a problem hiding this comment.
I tested locally by adding a false in the make doc target.
Running make static-test correctly fails:
Running './dist/tools/doccheck/check.sh' x
Command output:
'make doc' exited with non-zero code (2)
make[1]: Entering directory '/home/harter/work/git/RIOT'
"make" -BC doc/doxygen
make[2]: Entering directory '/home/harter/work/git/RIOT/doc/doxygen'
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
*make[2]: Leaving directory '/home/harter/work/git/RIOT/doc/doxygen'
false
Makefile:10: recipe for target 'doc' failed
make[1]: *** [doc] Error 1
make[1]: Leaving directory '/home/harter/work/git/RIOT'
When run with the same test commit in master, the error is not detected.
An invalid command in a doxygen message is also still detected
ERROR: Doxygen generates the following warnings:
core/include/assert.h:18: warning: Found unknown command `\auienras'
When you push force please put a message in the PR or we do not receive any notification about it.
|
@jia200x It's good for me, I let you have the final word. |
D'oh, I didn't realize I could do that. I was trying to force it to fail by inserting garbage into the doxyfile. |
The issues were addressed (see comments)
The previous doccheck would give a false negative when doxygen does not even run (because of misconfiguration). Guess what? Doxygen was never running on Travis! That means our docchecks in the static tests were a lie.
Issues/PRs references
For an example of why this is a problem, see #9818.
Depends on #10237 (if we enable the check before fixing travis then everything will fail,)Depends on
#10251(the old version of Doxygen currently in travis reports a lot of errors).