From eb179f4aea6959c05896e10f5e597b7a539a1189 Mon Sep 17 00:00:00 2001 From: Eduardo Ponz Segrelles Date: Wed, 5 Jun 2024 12:51:00 +0200 Subject: [PATCH] Check subprocess return codes on RDT generation (#795) Signed-off-by: eduponz (cherry picked from commit 0974196bd09151b49d3a9a39983b02506054635f) --- docs/conf.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 92ccb2494..39254b4d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -285,10 +285,13 @@ def configure_doxyfile( project_source_dir ) # Generate doxygen documentation - subprocess.call('doxygen {}'.format(doxyfile_out), shell=True) + doxygen_ret = subprocess.call('doxygen {}'.format(doxyfile_out), shell=True) + if doxygen_ret != 0: + print('Doxygen failed with return code {}'.format(doxygen_ret)) + sys.exit(doxygen_ret) # Generate SWIG code. - subprocess.call('swig -python -doxygen -I{}/include \ + swig_ret = subprocess.call('swig -python -doxygen -I{}/include \ -outdir {}/fastdds_python/src/swig -c++ -interface \ _fastdds_python -o \ {}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \ @@ -298,6 +301,10 @@ def configure_doxyfile( fastdds_python_repo_name, fastdds_python_repo_name ), shell=True) + if swig_ret != 0: + print('SWIG failed with return code {}'.format(swig_ret)) + sys.exit(swig_ret) + fastdds_python_imported_location = '{}/fastdds_python/src/swig'.format( fastdds_python_repo_name) autodoc_mock_imports = ["_fastdds_python"]