From a4b9511d2dbbf26b3deb8a6fc81bdc78a019e7be Mon Sep 17 00:00:00 2001 From: Mario-DL Date: Tue, 12 Nov 2024 11:25:39 +0100 Subject: [PATCH 1/8] Refs #21886: Bump windows ci image to 2022 Signed-off-by: Mario-DL --- .github/workflows/reusable-windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 3a312beb9d0..a126a0bf325 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -35,7 +35,7 @@ defaults: jobs: reusable-windows-ci: - runs-on: windows-2019 + runs-on: windows-2022 strategy: fail-fast: false matrix: From 0e7ec1425a6966a4728663d9b5fd15f0e67d4b50 Mon Sep 17 00:00:00 2001 From: Mario-DL Date: Tue, 12 Nov 2024 11:27:17 +0100 Subject: [PATCH 2/8] Refs #21886: Add FASTDDS_EXAMPLE_TESTS=ON for windows ci tests Signed-off-by: Mario-DL --- .github/workflows/reusable-windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index a126a0bf325..086cff142da 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -144,7 +144,7 @@ jobs: colcon_build_args: ${{ inputs.colcon-args }} # The following Fast DDS CMake options need to be specified here instead of in the meta files # because they vary from platform to platform - cmake_args_default: ${{ inputs.cmake-args }} -T ${{ matrix.vs-toolset }} -DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX" + cmake_args_default: ${{ inputs.cmake-args }} -T ${{ matrix.vs-toolset }} -DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DFASTDDS_EXAMPLE_TESTS=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX" cmake_build_type: ${{ inputs.cmake-config }} workspace: ${{ github.workspace }} From e3d34d10a98d30f367536c670913902a009aa64c Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Tue, 12 Nov 2024 08:44:34 +0100 Subject: [PATCH 3/8] Refs #21886: Add matched argument to hello_world example Signed-off-by: Mario Dominguez --- examples/cpp/hello_world/CLIParser.hpp | 38 +++++++++++++++++++++++ examples/cpp/hello_world/PublisherApp.cpp | 3 +- examples/cpp/hello_world/PublisherApp.hpp | 2 ++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/examples/cpp/hello_world/CLIParser.hpp b/examples/cpp/hello_world/CLIParser.hpp index edd0863e321..df39ed8e229 100644 --- a/examples/cpp/hello_world/CLIParser.hpp +++ b/examples/cpp/hello_world/CLIParser.hpp @@ -46,6 +46,7 @@ class CLIParser struct publisher_config { uint16_t samples = 0; + uint16_t matched = 1; }; //! Subscriber application configuration structure @@ -83,6 +84,9 @@ class CLIParser std::cout << " -s , --samples Number of samples to send or receive" << std::endl; std::cout << " [0 <= <= 65535]" << std::endl; std::cout << " (Default: 0 [unlimited])" << std::endl; + std::cout << "Publisher options:" << std::endl; + std::cout << " -m, --matched Number of participants to discover" << std::endl; + std::cout << " before start publishing (Default: 1)" << std::endl; std::cout << "Subscriber options:" << std::endl; std::cout << " -w, --waitset Use waitset & read condition" << std::endl; std::exit(return_code); @@ -194,6 +198,40 @@ class CLIParser print_help(EXIT_FAILURE); } } + else if (arg == "-m" || arg == "--matched") + { + try + { + int input = std::stoi(argv[++i]); + if (input < std::numeric_limits::min() || + input > std::numeric_limits::max()) + { + throw std::out_of_range("matched argument out of range"); + } + else + { + if (config.entity == CLIParser::EntityKind::PUBLISHER) + { + config.pub_config.matched = static_cast(input); + } + else + { + EPROSIMA_LOG_ERROR(CLI_PARSER, "matched can only be used with the publisher entity"); + print_help(EXIT_FAILURE); + } + } + } + catch (const std::invalid_argument& e) + { + EPROSIMA_LOG_ERROR(CLI_PARSER, "invalid sample argument for " + arg + ": " + e.what()); + print_help(EXIT_FAILURE); + } + catch (const std::out_of_range& e) + { + EPROSIMA_LOG_ERROR(CLI_PARSER, "sample argument out of range for " + arg + ": " + e.what()); + print_help(EXIT_FAILURE); + } + } else { EPROSIMA_LOG_ERROR(CLI_PARSER, "unknown option " + arg); diff --git a/examples/cpp/hello_world/PublisherApp.cpp b/examples/cpp/hello_world/PublisherApp.cpp index 63b4331137e..101c01173d8 100644 --- a/examples/cpp/hello_world/PublisherApp.cpp +++ b/examples/cpp/hello_world/PublisherApp.cpp @@ -47,6 +47,7 @@ PublisherApp::PublisherApp( , type_(new HelloWorldPubSubType()) , matched_(0) , samples_(config.samples) + , expected_matches_(config.matched) , stop_(false) { // Set up the data type with initial values @@ -152,7 +153,7 @@ bool PublisherApp::publish() cv_.wait(matched_lock, [&]() { // at least one has been discovered - return ((matched_ > 0) || is_stopped()); + return ((matched_ >= expected_matches_) || is_stopped()); }); if (!is_stopped()) diff --git a/examples/cpp/hello_world/PublisherApp.hpp b/examples/cpp/hello_world/PublisherApp.hpp index ed62f856780..a3d61e461b0 100644 --- a/examples/cpp/hello_world/PublisherApp.hpp +++ b/examples/cpp/hello_world/PublisherApp.hpp @@ -82,6 +82,8 @@ class PublisherApp : public Application, public DataWriterListener uint16_t samples_; + uint16_t expected_matches_; + std::mutex mutex_; std::condition_variable cv_; From 98bb37ef5cd6833fad808d800e90ae74c6e69d1b Mon Sep 17 00:00:00 2001 From: Mario-DL Date: Tue, 12 Nov 2024 11:32:21 +0100 Subject: [PATCH 4/8] Refs #21886: Add Windows testing Dockerfile Signed-off-by: Mario-DL --- test/examples/windows/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/examples/windows/Dockerfile diff --git a/test/examples/windows/Dockerfile b/test/examples/windows/Dockerfile new file mode 100644 index 00000000000..6d4fcd72d94 --- /dev/null +++ b/test/examples/windows/Dockerfile @@ -0,0 +1,12 @@ +FROM mcr.microsoft.com/powershell:windowsservercore-ltsc2022 + +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# Install Chocolately +RUN Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + +# Install VC++ Redistributable 2022 +RUN choco install -y vcredist140 + +# Install OpenSSL latest +RUN choco install -y openssl From c300c3eabd89c93c4ce322d442d2c60533222a39 Mon Sep 17 00:00:00 2001 From: Mario-DL Date: Tue, 12 Nov 2024 11:34:40 +0100 Subject: [PATCH 5/8] Refs #21886: Refactor CMakeLists example tests and hello_world compose Signed-off-by: Mario-DL --- test/examples/CMakeLists.txt | 77 +++++++++++++++++++++++---- test/examples/hello_world.compose.yml | 29 +++++----- 2 files changed, 80 insertions(+), 26 deletions(-) diff --git a/test/examples/CMakeLists.txt b/test/examples/CMakeLists.txt index 7dd4dfeedee..bf0c3786b0d 100644 --- a/test/examples/CMakeLists.txt +++ b/test/examples/CMakeLists.txt @@ -28,6 +28,13 @@ set(SHELL_EXECUTABLE "") set(TINYXML2_LIB_DIR_COMPOSE_VOLUME "") set(TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH "") +# Configure TinyXML2 library path if installed in user library path +if(NOT (TINYXML2_FROM_SOURCE OR TINYXML2_FROM_THIRDPARTY)) + get_filename_component(TINYXML2_LIB_DIR ${TINYXML2_LIBRARY} DIRECTORY) + set(TINYXML2_LIB_DIR_COMPOSE_VOLUME "- ${TINYXML2_LIB_DIR}:${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/fastdds:ro") + set(TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH ":${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/fastdds") +endif() + # Linux configurations if(UNIX AND NOT(APPLE) AND NOT(QNXNTO) AND NOT(ANDROID)) # Find bash @@ -39,6 +46,21 @@ if(UNIX AND NOT(APPLE) AND NOT(QNXNTO) AND NOT(ANDROID)) set(SHELL_EXECUTABLE ${BASH_EXECUTABLE}) set(DOCKER_IMAGE_NAME "ubuntu:22.04") + set(PROJECT_BINARY_DIR_COMPOSE_VOLUME "${PROJECT_BINARY_DIR}:${PROJECT_BINARY_DIR}") + set(fastcdr_LIB_DIR_COMPOSE_VOLUME "${fastcdr_LIB_DIR}:${fastcdr_LIB_DIR}") + set(CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME "${CMAKE_INSTALL_PREFIX}:${CMAKE_INSTALL_PREFIX}") + + set(PATH_ENVIRONMENT_VARIABLE_COMPOSE "LD_LIBRARY_PATH: ${PROJECT_BINARY_DIR}/src/cpp:${fastcdr_LIB_DIR}") + if (TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH) + set(PATH_ENVIRONMENT_VARIABLE_COMPOSE "${PATH_ENVIRONMENT_VARIABLE_COMPOSE}${TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH}") + endif() + set(EXAMPLE_PREFIX_DIR_COMPOSE "${PROJECT_BINARY_DIR}/examples/cpp") + set(EXAMPLE_SUFFIX_DIR_COMPOSE "") + set(FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE "${PROJECT_BINARY_DIR}/examples/cpp") + set(COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE "$\${EXAMPLE_DIR}") + set(COMMAND_CONCATENATE_COMPOSE "&") + set(COMMAND_BACKGROUND_JOB_COMPOSE "") + # Windows configurations elseif(WIN32) # Find pwsh @@ -47,27 +69,60 @@ elseif(WIN32) message(FATAL_ERROR "pwsh not found") endif() - set(PWSH_EXECUTABLE ${BASH_EXECUTABLE}) + set(PWSH_VERSION_DOCKER "latest") + set(SHELL_EXECUTABLE "C:/\"Program Files\"/PowerShell/${PWSH_VERSION_DOCKER}/pwsh.exe") + set(FILE_EXTENSION ".exe") + set(DOCKER_IMAGE_NAME "windows-testing") - # We don't know which docker image to use for Windows yet - message(FATAL_ERROR "Windows not supported yet") + cmake_path(GET fastcdr_LIB_DIR PARENT_PATH fastcdr_INSTALL_DIR) + # Ensure drives inside docker are mounted in C: drive + string(REGEX REPLACE ".:" "C:" CMAKE_INSTALL_PREFIX_C ${CMAKE_INSTALL_PREFIX}) + string(REGEX REPLACE ".:" "C:" PROJECT_BINARY_DIR_C ${PROJECT_BINARY_DIR}) + string(REGEX REPLACE ".:" "C:" fastcdr_INSTALL_DIR_C ${fastcdr_INSTALL_DIR}) + + set(PROJECT_BINARY_DIR_COMPOSE_VOLUME "${PROJECT_BINARY_DIR}:${PROJECT_BINARY_DIR_C}") + set(fastcdr_LIB_DIR_COMPOSE_VOLUME "${fastcdr_INSTALL_DIR}/bin:${fastcdr_INSTALL_DIR_C}/bin") + set(CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME "${CMAKE_INSTALL_PREFIX}/bin:${CMAKE_INSTALL_PREFIX_C}/bin") + + set(PATH_ENVIRONMENT_VARIABLE_COMPOSE "PATH: C:/Program Files/OpenSSL-Win64;${CMAKE_INSTALL_PREFIX_C}/bin;${fastcdr_INSTALL_DIR_C}/bin;C:/Windows/System32;C:/Windows/System32/downlevel;") + set(EXAMPLE_PREFIX_DIR_COMPOSE "${PROJECT_BINARY_DIR_C}/examples/cpp") + if (CMAKE_BUILD_TYPE) + set(EXAMPLE_SUFFIX_DIR_COMPOSE "${CMAKE_BUILD_TYPE}") + else() + set(EXAMPLE_SUFFIX_DIR_COMPOSE "Release") + endif() + set(FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE "${PROJECT_BINARY_DIR_C}/examples/cpp") + set(COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE "& $\$Env:EXAMPLE_DIR") + set(COMMAND_CONCATENATE_COMPOSE "&\" \"") + set(COMMAND_BACKGROUND_JOB_COMPOSE "; Receive-Job 1 -Wait") + + set(WIN_DOCKERFILE ${CMAKE_CURRENT_LIST_DIR}/windows/Dockerfile) + # Generate image for testing + add_custom_target( + windows_docker_image_testing_generation + ALL + # Launch the docker build command using the build context. + COMMAND ${DOCKER_EXECUTABLE} build + --tag ${DOCKER_IMAGE_NAME} + --file ${WIN_DOCKERFILE} + ${CMAKE_CURRENT_LIST_DIR} + COMMENT "Creating windows image for testing..." VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) # Unsupported platform else() message(FATAL_ERROR "Unsupported platform") endif() -# Configure TinyXML2 library path if installed in user library path -if(NOT (TINYXML2_FROM_SOURCE OR TINYXML2_FROM_THIRDPARTY)) - get_filename_component(TINYXML2_LIB_DIR ${TINYXML2_LIBRARY} DIRECTORY) - set(TINYXML2_LIB_DIR_COMPOSE_VOLUME "- ${TINYXML2_LIB_DIR}:${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/fastdds:ro") - set(TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH ":${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/fastdds") +if(WIN32) + # Temporarily, test hello world + file(GLOB examples_python_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*world.py) +else() + # Find all pytest files for testing + file(GLOB examples_python_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.py) endif() -# Find all pytest files for testing -file(GLOB examples_python_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.py) - # Add security test only if security is enabled if (NOT SECURITY) list(FILTER examples_python_tests EXCLUDE REGEX "security") diff --git a/test/examples/hello_world.compose.yml b/test/examples/hello_world.compose.yml index affe3533b8a..374a6474dfc 100644 --- a/test/examples/hello_world.compose.yml +++ b/test/examples/hello_world.compose.yml @@ -11,33 +11,32 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: waitset-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ subscriber --waitset --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ subscriber --waitset --samples 10" subscriber-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ subscriber --samples 10 & $${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ publisher --samples 10 --matched 2 @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ subscriber --samples 10@COMMAND_BACKGROUND_JOB_COMPOSE@" depends_on: - waitset-subscriber From 53903f0949b673c01c76e36672fa67f0d9c266f8 Mon Sep 17 00:00:00 2001 From: Mario-DL Date: Tue, 12 Nov 2024 11:36:34 +0100 Subject: [PATCH 6/8] Refs #21886: test_hello_world.py fix Signed-off-by: Mario-DL --- test/examples/test_hello_world.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/examples/test_hello_world.py b/test/examples/test_hello_world.py index 56503c5d988..481ab21740e 100644 --- a/test/examples/test_hello_world.py +++ b/test/examples/test_hello_world.py @@ -20,7 +20,7 @@ def test_hello_world(): out = '' try: out = subprocess.check_output( - '@DOCKER_EXECUTABLE@ compose -f hello_world.compose.yml up', + '"@DOCKER_EXECUTABLE@" compose -f hello_world.compose.yml up', stderr=subprocess.STDOUT, shell=True, timeout=20 @@ -42,9 +42,8 @@ def test_hello_world(): ' (expected: ' + str(sent * 2) + ')') raise subprocess.CalledProcessError(1, '') - except subprocess.CalledProcessError: - for l in out: - print(l) + except subprocess.CalledProcessError as e: + print ('ERROR %s', e.output) except subprocess.TimeoutExpired: print('TIMEOUT') print(out) From 7205a2652977243bb2c0ece9eebaa89469758c74 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Tue, 12 Nov 2024 15:35:28 +0100 Subject: [PATCH 7/8] Refs #21886: Update docker compose file structure of the rest of examples Signed-off-by: Mario Dominguez --- test/examples/configuration.compose.yml | 29 ++++---- test/examples/content_filter.compose.yml | 13 ++-- test/examples/custom_payload_pool.compose.yml | 23 +++--- test/examples/delivery_mechanisms.compose.yml | 37 +++++----- .../delivery_mechanisms_isolated.compose.yml | 37 +++++----- test/examples/discovery_server.compose.yml | 50 +++++++------ test/examples/flow_control.compose.yml | 29 ++++---- test/examples/request_reply.compose.yml | 29 ++++---- .../request_reply_isolated.compose.yml | 60 +++++++--------- test/examples/rtps.compose.yml | 53 +++++++------- test/examples/security.compose.yml | 29 ++++---- .../examples/static_edp_discovery.compose.yml | 25 ++++--- test/examples/topic_instances.compose.yml | 25 ++++--- test/examples/xtypes_complete.compose.yml | 71 +++++++++---------- test/examples/xtypes_minimal.compose.yml | 71 +++++++++---------- 15 files changed, 280 insertions(+), 301 deletions(-) diff --git a/test/examples/configuration.compose.yml b/test/examples/configuration.compose.yml index f35dd6c3c00..4d75d11701d 100644 --- a/test/examples/configuration.compose.yml +++ b/test/examples/configuration.compose.yml @@ -11,34 +11,33 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/configuration - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/configuration/configuration_profile.xml + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/configuration/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/configuration/configuration_profile.xml SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/configuration@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/configuration@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" publisher-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/configuration - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/configuration/configuration_profile.xml + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/configuration/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/configuration/configuration_profile.xml PUBLISHER_ADDITIONAL_ARGUMENTS: ${PUB_ARGS} SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/configuration@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} & $${EXAMPLE_DIR}/configuration@FILE_EXTENSION@ publisher --samples 10 --wait 2 $${PUBLISHER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/configuration@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/configuration@FILE_EXTENSION@ publisher --samples 10 --wait 2 $${PUBLISHER_ADDITIONAL_ARGUMENTS}@COMMAND_BACKGROUND_JOB_COMPOSE@" diff --git a/test/examples/content_filter.compose.yml b/test/examples/content_filter.compose.yml index f5aeac590c7..8c45f34f2d9 100644 --- a/test/examples/content_filter.compose.yml +++ b/test/examples/content_filter.compose.yml @@ -11,18 +11,17 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/content_filter@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/content_filter/@EXAMPLE_SUFFIX_DIR_COMPOSE@ SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/content_filter@FILE_EXTENSION@ subscriber $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} --lower-bound 4 --upper-bound 8 --reliable --transient-local & $${EXAMPLE_DIR}/content_filter@FILE_EXTENSION@ publisher --samples 15 --interval 100 --reliable --transient-local" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/content_filter@FILE_EXTENSION@ subscriber $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} --lower-bound 4 --upper-bound 8 --reliable --transient-local @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/content_filter@FILE_EXTENSION@ publisher --samples 15 --interval 100 --reliable --transient-local@COMMAND_BACKGROUND_JOB_COMPOSE@" diff --git a/test/examples/custom_payload_pool.compose.yml b/test/examples/custom_payload_pool.compose.yml index bbccefb3c2e..1a5aace0654 100644 --- a/test/examples/custom_payload_pool.compose.yml +++ b/test/examples/custom_payload_pool.compose.yml @@ -11,31 +11,30 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/custom_payload_pool + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/custom_payload_pool/@EXAMPLE_SUFFIX_DIR_COMPOSE@ command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/custom_payload_pool@FILE_EXTENSION@ subscriber --samples 10" publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/custom_payload_pool - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/custom_payload_pool@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/custom_payload_pool/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/custom_payload_pool@FILE_EXTENSION@ publisher --samples 10" depends_on: - subscriber diff --git a/test/examples/delivery_mechanisms.compose.yml b/test/examples/delivery_mechanisms.compose.yml index ecbb6c6497e..11859708198 100644 --- a/test/examples/delivery_mechanisms.compose.yml +++ b/test/examples/delivery_mechanisms.compose.yml @@ -11,51 +11,50 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${ISUB_ARGS} # avoid ipc host to isolate this subscriber for sharing memory with other containers network_mode: host - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS}" publisher-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBLISHER_ADDITIONAL_ARGUMENTS: ${PUB_ARGS} SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} network_mode: host ipc: host - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS} & $${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS} @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}@COMMAND_BACKGROUND_JOB_COMPOSE@" pubsub: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBSUB_ADDITIONAL_ARGUMENTS: ${PUBSUB_ARGS} network_mode: host ipc: host - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ pubsub --samples 10 $${PUBSUB_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ pubsub --samples 10 $${PUBSUB_ADDITIONAL_ARGUMENTS}" diff --git a/test/examples/delivery_mechanisms_isolated.compose.yml b/test/examples/delivery_mechanisms_isolated.compose.yml index 124e3231edf..d36ddac48c7 100644 --- a/test/examples/delivery_mechanisms_isolated.compose.yml +++ b/test/examples/delivery_mechanisms_isolated.compose.yml @@ -11,60 +11,59 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${ISUB_ARGS} # avoid network and ipc host to isolate this subscriber for sharing memory with other containers networks: delivery_mechanisms_net: ipv4_address: 113.1.1.2 - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${ISOLATED_SUBSCRIBER_ADDITIONAL_ARGUMENTS}" publisher-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBLISHER_ADDITIONAL_ARGUMENTS: ${PUB_ARGS} SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} # avoid network and ipc host to isolate this subscriber for sharing memory with other containers networks: delivery_mechanisms_net: ipv4_address: 113.1.1.3 - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} & $${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS}@COMMAND_BACKGROUND_JOB_COMPOSE@" pubsub: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/delivery_mechanisms + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/delivery_mechanisms/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBSUB_ADDITIONAL_ARGUMENTS: ${PUBSUB_ARGS} # avoid network and ipc host to isolate this subscriber for sharing memory with other containers networks: delivery_mechanisms_net: ipv4_address: 113.1.1.4 - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/delivery_mechanisms@FILE_EXTENSION@ pubsub --samples 10 $${PUBSUB_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/delivery_mechanisms@FILE_EXTENSION@ pubsub --samples 10 $${PUBSUB_ADDITIONAL_ARGUMENTS}" networks: delivery_mechanisms_net: diff --git a/test/examples/discovery_server.compose.yml b/test/examples/discovery_server.compose.yml index 127e034b336..f077e7c943d 100644 --- a/test/examples/discovery_server.compose.yml +++ b/test/examples/discovery_server.compose.yml @@ -12,21 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -version: "3" - services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/discovery_server@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/discovery_server/@EXAMPLE_SUFFIX_DIR_COMPOSE@ SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/discovery_server@FILE_EXTENSION@ subscriber --reliable --transient-local $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/discovery_server@FILE_EXTENSION@ subscriber --reliable --transient-local $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" network_mode: host ipc: host depends_on: @@ -35,15 +33,15 @@ services: publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/discovery_server@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/discovery_server/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBLISHER_ADDITIONAL_ARGUMENTS: ${PUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/discovery_server@FILE_EXTENSION@ publisher --reliable --transient-local $${PUBLISHER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/discovery_server@FILE_EXTENSION@ publisher --reliable --transient-local $${PUBLISHER_ADDITIONAL_ARGUMENTS}" network_mode: host ipc: host depends_on: @@ -52,29 +50,29 @@ services: server_1: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/discovery_server@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/discovery_server/@EXAMPLE_SUFFIX_DIR_COMPOSE@ SERVER1_ADDITIONAL_ARGUMENTS: ${SERVER1_ARGS} network_mode: host ipc: host - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/discovery_server@FILE_EXTENSION@ server $${SERVER1_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/discovery_server@FILE_EXTENSION@ server $${SERVER1_ADDITIONAL_ARGUMENTS}" server_2: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/discovery_server@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/discovery_server/@EXAMPLE_SUFFIX_DIR_COMPOSE@ SERVER2_ADDITIONAL_ARGUMENTS: ${SERVER2_ARGS} network_mode: host ipc: host - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/discovery_server@FILE_EXTENSION@ server $${SERVER2_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/discovery_server@FILE_EXTENSION@ server $${SERVER2_ADDITIONAL_ARGUMENTS}" diff --git a/test/examples/flow_control.compose.yml b/test/examples/flow_control.compose.yml index 7a048e51d82..32f8192caf0 100644 --- a/test/examples/flow_control.compose.yml +++ b/test/examples/flow_control.compose.yml @@ -11,33 +11,32 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/flow_control@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/flow_control/flow_control_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/flow_control@FILE_EXTENSION@ subscriber --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/flow_control/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/flow_control/flow_control_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/flow_control@FILE_EXTENSION@ subscriber --samples 10" publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/flow_control - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/flow_control/flow_control_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/flow_control@FILE_EXTENSION@ publisher --samples 10 --period 500 --max-bytes 300000 --scheduler PRIORITY-RESERVATION --bandwidth 99 --priority 1" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/flow_control/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/flow_control/flow_control_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/flow_control@FILE_EXTENSION@ publisher --samples 10 --period 500 --max-bytes 300000 --scheduler PRIORITY-RESERVATION --bandwidth 99 --priority 1" depends_on: - subscriber diff --git a/test/examples/request_reply.compose.yml b/test/examples/request_reply.compose.yml index d5399d18cc8..abb6a9d9194 100644 --- a/test/examples/request_reply.compose.yml +++ b/test/examples/request_reply.compose.yml @@ -11,31 +11,30 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: server-client: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 2 5 & timeout --preserve-status 3 $${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ server" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 2 5 @COMMAND_CONCATENATE_COMPOSE@ timeout --preserve-status 3 @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ server@COMMAND_BACKGROUND_JOB_COMPOSE@" alone-client: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 67 24" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 67 24" diff --git a/test/examples/request_reply_isolated.compose.yml b/test/examples/request_reply_isolated.compose.yml index 2e35faf7657..851b9bf84ce 100644 --- a/test/examples/request_reply_isolated.compose.yml +++ b/test/examples/request_reply_isolated.compose.yml @@ -11,21 +11,20 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: server-1: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "timeout --preserve-status 3 $${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ server" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "timeout --preserve-status 3 @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ server" server-2: image: @DOCKER_IMAGE_NAME@ @@ -34,11 +33,10 @@ services: - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "timeout --preserve-status 3 $${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ server" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "timeout --preserve-status 3 @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ server" client-1: image: @DOCKER_IMAGE_NAME@ @@ -47,11 +45,10 @@ services: - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 2 5" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 2 5" depends_on: - server-1 - server-2 @@ -63,11 +60,10 @@ services: - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 67 24" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 67 24" depends_on: - server-1 - server-2 @@ -79,11 +75,10 @@ services: - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 3 2" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 3 2" depends_on: - server-1 - server-2 @@ -95,11 +90,10 @@ services: - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/request_reply@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/request_reply/request_reply_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/request_reply@FILE_EXTENSION@ client 20 5" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/request_reply/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/request_reply/request_reply_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/request_reply@FILE_EXTENSION@ client 20 5" depends_on: - server-1 - server-2 diff --git a/test/examples/rtps.compose.yml b/test/examples/rtps.compose.yml index 0584a4ccda7..71bb61693c4 100644 --- a/test/examples/rtps.compose.yml +++ b/test/examples/rtps.compose.yml @@ -11,45 +11,44 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: sub-rtps: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/rtps@FILE_EXTENSION@ - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/rtps@FILE_EXTENSION@ reader --samples 20" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/rtps/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/rtps@FILE_EXTENSION@ reader --samples 20" sub-dds: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/rtps/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ subscriber --samples 20" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/rtps/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ subscriber --samples 20" pub-rtps: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/rtps - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/rtps@FILE_EXTENSION@ writer --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/rtps/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/rtps@FILE_EXTENSION@ writer --samples 10" depends_on: - sub-rtps - sub-dds @@ -57,15 +56,15 @@ services: pub-dds: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/rtps/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/rtps/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ publisher --samples 10" depends_on: - sub-rtps - sub-dds diff --git a/test/examples/security.compose.yml b/test/examples/security.compose.yml index 1abf5eddb90..8ea284896ac 100644 --- a/test/examples/security.compose.yml +++ b/test/examples/security.compose.yml @@ -11,34 +11,33 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/security + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/security/@EXAMPLE_SUFFIX_DIR_COMPOSE@ CERTS_PATH: @PROJECT_BINARY_DIR@/examples/cpp/security/certs - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/security/secure_subscriber_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/security@FILE_EXTENSION@ subscriber --samples 10" + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/security/secure_subscriber_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/security@FILE_EXTENSION@ subscriber --samples 10" publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/security + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/security/@EXAMPLE_SUFFIX_DIR_COMPOSE@ CERTS_PATH: @PROJECT_BINARY_DIR@/examples/cpp/security/certs - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/security/secure_publisher_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/security@FILE_EXTENSION@ publisher --samples 10" + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/security/secure_publisher_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/security@FILE_EXTENSION@ publisher --samples 10" diff --git a/test/examples/static_edp_discovery.compose.yml b/test/examples/static_edp_discovery.compose.yml index fd315d553ce..258e2090dd2 100644 --- a/test/examples/static_edp_discovery.compose.yml +++ b/test/examples/static_edp_discovery.compose.yml @@ -11,33 +11,32 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/static_edp_discovery@FILE_EXTENSION@ + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/static_edp_discovery/@EXAMPLE_SUFFIX_DIR_COMPOSE@ XML_FILE: @PROJECT_BINARY_DIR@/examples/cpp/static_edp_discovery/HelloWorld_static_disc.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/static_edp_discovery@FILE_EXTENSION@ subscriber --samples 10 --xml $${XML_FILE}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/static_edp_discovery@FILE_EXTENSION@ subscriber --samples 10 --xml $${XML_FILE}" subscriber-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/static_edp_discovery + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/static_edp_discovery/@EXAMPLE_SUFFIX_DIR_COMPOSE@ XML_FILE: @PROJECT_BINARY_DIR@/examples/cpp/static_edp_discovery/HelloWorld_static_disc.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/static_edp_discovery@FILE_EXTENSION@ subscriber --samples 10 --xml $${XML_FILE} & $${EXAMPLE_DIR}/static_edp_discovery@FILE_EXTENSION@ publisher --samples 10 --xml $${XML_FILE}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/static_edp_discovery@FILE_EXTENSION@ subscriber --samples 10 --xml $${XML_FILE} @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/static_edp_discovery@FILE_EXTENSION@ publisher --samples 10 --xml $${XML_FILE}@COMMAND_BACKGROUND_JOB_COMPOSE@" depends_on: - subscriber diff --git a/test/examples/topic_instances.compose.yml b/test/examples/topic_instances.compose.yml index c18b85ea48c..c53d86d5522 100644 --- a/test/examples/topic_instances.compose.yml +++ b/test/examples/topic_instances.compose.yml @@ -11,32 +11,31 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: late-joiner-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/topic_instances + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/topic_instances/@EXAMPLE_SUFFIX_DIR_COMPOSE@ SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "sleep 5 && $${EXAMPLE_DIR}/topic_instances@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "sleep 5 && @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/topic_instances@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS}" publisher-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/topic_instances + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/topic_instances/@EXAMPLE_SUFFIX_DIR_COMPOSE@ PUBLISHER_ADDITIONAL_ARGUMENTS: ${PUB_ARGS} SUBSCRIBER_ADDITIONAL_ARGUMENTS: ${SUB_ARGS} - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/topic_instances@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} & $${EXAMPLE_DIR}/topic_instances@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS}" + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/topic_instances@FILE_EXTENSION@ subscriber --samples 10 $${SUBSCRIBER_ADDITIONAL_ARGUMENTS} @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/topic_instances@FILE_EXTENSION@ publisher --samples 10 $${PUBLISHER_ADDITIONAL_ARGUMENTS}@COMMAND_BACKGROUND_JOB_COMPOSE@" diff --git a/test/examples/xtypes_complete.compose.yml b/test/examples/xtypes_complete.compose.yml index 6f8ec00de66..f3b13b33021 100644 --- a/test/examples/xtypes_complete.compose.yml +++ b/test/examples/xtypes_complete.compose.yml @@ -11,34 +11,33 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: xtypes-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_complete_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ subscriber --samples 30" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_complete_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ subscriber --samples 30" xtypes-subscriber-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_complete_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ subscriber --samples 30 & $${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_complete_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ subscriber --samples 30 @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ publisher --samples 10@COMMAND_BACKGROUND_JOB_COMPOSE@" depends_on: - xtypes-subscriber - helloworld-subscriber @@ -46,28 +45,28 @@ services: helloworld-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ subscriber --samples 30" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ subscriber --samples 30" helloworld-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ publisher --samples 10" depends_on: - xtypes-subscriber - helloworld-subscriber @@ -75,15 +74,15 @@ services: xtypes-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_complete_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ publisher --samples 10 --xml-type" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_complete_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ publisher --samples 10 --xml-type" depends_on: - xtypes-subscriber - helloworld-subscriber diff --git a/test/examples/xtypes_minimal.compose.yml b/test/examples/xtypes_minimal.compose.yml index c141f768a0a..426a619f6ae 100644 --- a/test/examples/xtypes_minimal.compose.yml +++ b/test/examples/xtypes_minimal.compose.yml @@ -11,34 +11,33 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -version: "3" services: xtypes-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_minimal_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ subscriber --samples 30" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_minimal_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ subscriber --samples 30" xtypes-subscriber-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_minimal_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ subscriber --samples 30 & $${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_minimal_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ subscriber --samples 30 @COMMAND_CONCATENATE_COMPOSE@ @COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ publisher --samples 10@COMMAND_BACKGROUND_JOB_COMPOSE@" depends_on: - xtypes-subscriber - helloworld-subscriber @@ -46,28 +45,28 @@ services: helloworld-subscriber: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ subscriber --samples 30" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ subscriber --samples 30" helloworld-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ publisher --samples 10" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/hello_world/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/hello_world/hello_world_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/hello_world@FILE_EXTENSION@ publisher --samples 10" depends_on: - xtypes-subscriber - helloworld-subscriber @@ -75,15 +74,15 @@ services: xtypes-publisher: image: @DOCKER_IMAGE_NAME@ volumes: - - @PROJECT_BINARY_DIR@:@PROJECT_BINARY_DIR@ - - @fastcdr_LIB_DIR@:@fastcdr_LIB_DIR@ + - @PROJECT_BINARY_DIR_COMPOSE_VOLUME@ + - @fastcdr_LIB_DIR_COMPOSE_VOLUME@ + - @CMAKE_INSTALL_PREFIX_COMPOSE_VOLUME@ @TINYXML2_LIB_DIR_COMPOSE_VOLUME@ environment: - # TODO(eduponz): LD_LIBRARY_PATH is not the correct variable for Windows - LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@ - EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes@FILE_EXTENSION@ - FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_minimal_profile.xml - command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ publisher --samples 10 --xml-type" + @PATH_ENVIRONMENT_VARIABLE_COMPOSE@ + EXAMPLE_DIR: @EXAMPLE_PREFIX_DIR_COMPOSE@/xtypes/@EXAMPLE_SUFFIX_DIR_COMPOSE@ + FASTDDS_DEFAULT_PROFILES_FILE: @FASTDDS_DEFAULT_PROFILES_FILE_PREFIX_COMPOSE@/xtypes/xtypes_minimal_profile.xml + command: @SHELL_EXECUTABLE@ -c "@COMMAND_EXAMPLE_DIR_PREFIX_COMPOSE@/xtypes@FILE_EXTENSION@ publisher --samples 10 --xml-type" depends_on: - xtypes-subscriber - helloworld-subscriber From 880df481c3e6c9cd0a42277c4d35dcae42f87787 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Wed, 27 Nov 2024 07:58:39 +0100 Subject: [PATCH 8/8] Refs #21886: versions.md Signed-off-by: Mario Dominguez --- versions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.md b/versions.md index 7d3fc3da1e4..973e9757ee2 100644 --- a/versions.md +++ b/versions.md @@ -8,6 +8,7 @@ Forthcoming * `DataReader::get_matched_publications()` * Added ``Extended Incompatible QoS`` feature for monitor service. * Machine UUID added to the Data(p) to check Participants in same host, instead of using GUIDs. +* Windows ci example testing infrastructure and `hello world` example. Version v3.1.0 --------------