Skip to content

Commit 5ff2333

Browse files
run.py: raise exception on doc build error
Signed-off-by: Lisanna Dettwyler <[email protected]>
1 parent ba2c1ef commit 5ff2333

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/generate_docs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ def generate_common(dstpath, sections, ver, rev):
247247
# Doxygen generates XML files needed by sphinx breathe plugin for API documentation
248248
print("Generating doxygen...")
249249
cmdline = "doxygen Doxyfile"
250-
os.system(cmdline)
250+
rc = os.waitstatus_to_exitcode(os.system(cmdline))
251+
if rc > 0:
252+
raise Exception("doxygen returned %d"%rc)
251253

252254
# workaround for C++ standard keywords redefined due to missing Doxygen options to set the preferred C++ standard
253255
_postprocess_generated_xml(xmlpath)
@@ -263,8 +265,10 @@ def generate_html(dstpath):
263265
cmdline = "sphinx-build -M html %s ../docs"%sourcepath
264266
print(cmdline)
265267
os.environ["PYTHONWARNINGS"] = "ignore"
266-
os.system(cmdline)
268+
rc = os.waitstatus_to_exitcode(os.system(cmdline))
267269
os.environ.pop("PYTHONWARNINGS")
270+
if rc > 0:
271+
raise Exception("sphinx-build returned %d"%rc)
268272

269273
"""
270274
Entry-point:

0 commit comments

Comments
 (0)