Skip to content

Commit 0974196

Browse files
authored
Check subprocess return codes on RDT generation (#795)
Signed-off-by: eduponz <eduardoponz@eprosima.com>
1 parent 93f6c19 commit 0974196

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
@@ -293,10 +293,13 @@ def configure_doxyfile(
293293
project_source_dir
294294
)
295295
# Generate doxygen documentation
296-
subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
296+
doxygen_ret = subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
297+
if doxygen_ret != 0:
298+
print('Doxygen failed with return code {}'.format(doxygen_ret))
299+
sys.exit(doxygen_ret)
297300

298301
# Generate SWIG code.
299-
subprocess.call('swig -python -doxygen -I{}/include \
302+
swig_ret = subprocess.call('swig -python -doxygen -I{}/include \
300303
-outdir {}/fastdds_python/src/swig -c++ -interface \
301304
_fastdds_python -o \
302305
{}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \
@@ -306,6 +309,10 @@ def configure_doxyfile(
306309
fastdds_python_repo_name,
307310
fastdds_python_repo_name
308311
), shell=True)
312+
if swig_ret != 0:
313+
print('SWIG failed with return code {}'.format(swig_ret))
314+
sys.exit(swig_ret)
315+
309316
fastdds_python_imported_location = '{}/fastdds_python/src/swig'.format(
310317
fastdds_python_repo_name)
311318
autodoc_mock_imports = ["_fastdds_python"]

0 commit comments

Comments
 (0)