Skip to content

Commit fa81240

Browse files
EduPonzmergify[bot]
authored andcommitted
Check subprocess return codes on RDT generation (#795)
Signed-off-by: eduponz <eduardoponz@eprosima.com> (cherry picked from commit 0974196)
1 parent ecaecf5 commit fa81240

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,13 @@ def configure_doxyfile(
281281
project_source_dir
282282
)
283283
# Generate doxygen documentation
284-
subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
284+
doxygen_ret = subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
285+
if doxygen_ret != 0:
286+
print('Doxygen failed with return code {}'.format(doxygen_ret))
287+
sys.exit(doxygen_ret)
285288

286289
# Generate SWIG code.
287-
subprocess.call('swig -python -doxygen -I{}/include \
290+
swig_ret = subprocess.call('swig -python -doxygen -I{}/include \
288291
-outdir {}/fastdds_python/src/swig -c++ -interface \
289292
_fastdds_python -o \
290293
{}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \
@@ -294,6 +297,10 @@ def configure_doxyfile(
294297
fastdds_python_repo_name,
295298
fastdds_python_repo_name
296299
), shell=True)
300+
if swig_ret != 0:
301+
print('SWIG failed with return code {}'.format(swig_ret))
302+
sys.exit(swig_ret)
303+
297304
fastdds_python_imported_location = '{}/fastdds_python/src/swig'.format(
298305
fastdds_python_repo_name)
299306
autodoc_mock_imports = ["_fastdds_python"]

0 commit comments

Comments
 (0)