Skip to content

Commit 87eb73a

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 8a1602d commit 87eb73a

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
@@ -285,10 +285,13 @@ def configure_doxyfile(
285285
project_source_dir
286286
)
287287
# Generate doxygen documentation
288-
subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
288+
doxygen_ret = subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
289+
if doxygen_ret != 0:
290+
print('Doxygen failed with return code {}'.format(doxygen_ret))
291+
sys.exit(doxygen_ret)
289292

290293
# Generate SWIG code.
291-
subprocess.call('swig -python -doxygen -I{}/include \
294+
swig_ret = subprocess.call('swig -python -doxygen -I{}/include \
292295
-outdir {}/fastdds_python/src/swig -c++ -interface \
293296
_fastdds_python -o \
294297
{}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \
@@ -298,6 +301,10 @@ def configure_doxyfile(
298301
fastdds_python_repo_name,
299302
fastdds_python_repo_name
300303
), shell=True)
304+
if swig_ret != 0:
305+
print('SWIG failed with return code {}'.format(swig_ret))
306+
sys.exit(swig_ret)
307+
301308
fastdds_python_imported_location = '{}/fastdds_python/src/swig'.format(
302309
fastdds_python_repo_name)
303310
autodoc_mock_imports = ["_fastdds_python"]

0 commit comments

Comments
 (0)