From 683c9997bd6404ad577d8fa3fbaeedd64add3441 Mon Sep 17 00:00:00 2001 From: JLBuenoLopez-eProsima Date: Tue, 2 Apr 2024 11:30:02 +0200 Subject: [PATCH 1/2] Refs #20734: fix type regeneration script Signed-off-by: JLBuenoLopez-eProsima --- .../scripts/update_generated_code_from_idl.sh | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/utils/scripts/update_generated_code_from_idl.sh b/utils/scripts/update_generated_code_from_idl.sh index 9a7c5be4..4c4f25bd 100755 --- a/utils/scripts/update_generated_code_from_idl.sh +++ b/utils/scripts/update_generated_code_from_idl.sh @@ -1,12 +1,5 @@ #!/usr/bin/env bash -idl_files=( - './fastdds_python/test/types/test_modules.idl' - './fastdds_python/test/types/test_complete.idl' - './fastdds_python/test/types/test_included_modules.idl' - './fastdds_python_examples/HelloWorldExample/HelloWorld.idl' -) - red='\E[1;31m' yellow='\E[1;33m' textreset='\E[1;0m' @@ -25,22 +18,26 @@ fi ret_value=0 -for idl_file in "${idl_files[@]}"; do - idl_dir=$(dirname "${idl_file}") - file_from_gen=$(basename "${idl_file}") - - echo -e "Processing ${yellow}${idl_file}${textreset}" - - cd "${idl_dir}" +cd ./fastdds_python/test/types +echo -e "Processing ${yellow}test_complete.idl test_modules.idl${textreset}" +echo "Running: fastddsgen -cdr both -replace -python test_complete.idl test_modules.idl" +fastddsgen -cdr both -replace -python test_complete.idl test_modules.idl +if [[ $? != 0 ]]; then + ret_value=-1 +fi +cd - - echo "Running: fastddsgen -cdr both -replace -flat-output-dir -python ${file_from_gen}" - fastddsgen -cdr both -replace -flat-output-dir -python ${file_from_gen} +if [[ $ret_value != -1 ]]; then + cd "./fastdds_python_examples/HelloWorldExample" - if [[ $? != 0 ]]; then - ret_value=-1 - fi +echo -e "Processing ${yellow}HelloWorld.idl${textreset}" + echo "Running: fastddsgen -cdr both -replace -python HelloWorld.idl" + fastddsgen -cdr both -replace -python HelloWorld.idl +fi - cd - -done +if [[ $? != 0 ]]; then + ret_value=-1 +fi +cd - exit ${ret_value} From 8535b28c07b38beaf7b81a53e3f326c7f5f291a4 Mon Sep 17 00:00:00 2001 From: JLBuenoLopez-eProsima Date: Tue, 2 Apr 2024 11:31:34 +0200 Subject: [PATCH 2/2] Refs #20734: regenerate types using script Signed-off-by: JLBuenoLopez-eProsima --- fastdds_python_examples/HelloWorldExample/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt index 00f015ac..75aa5e75 100644 --- a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt +++ b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.16.3) +cmake_minimum_required(VERSION 3.22) # SWIG: use standard target name. if(POLICY CMP0078)