From bce2286ac12025583c340012494d3e658f37ed8f Mon Sep 17 00:00:00 2001 From: Raul Sanchez-Mateos Date: Fri, 6 Oct 2023 13:52:24 +0200 Subject: [PATCH 1/2] Add path option to ctest action Signed-off-by: Raul Sanchez-Mateos --- multiplatform/colcon_build_test/action.yml | 6 ++++++ multiplatform/colcon_test/action.yml | 6 ++++++ ubuntu/colcon_test/action.yml | 7 +++++++ windows/colcon_test/action.yml | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/multiplatform/colcon_build_test/action.yml b/multiplatform/colcon_build_test/action.yml index f0fca6e0..35721d79 100644 --- a/multiplatform/colcon_build_test/action.yml +++ b/multiplatform/colcon_build_test/action.yml @@ -22,6 +22,11 @@ inputs: required: false default: '' + ctest_extra_path: + description: 'Directories to be added to the system PATH when running tests' + required: false + default: '' + cmake_build_type: description: 'Set the cmake build type' required: false @@ -57,4 +62,5 @@ runs: workspace: ${{ inputs.workspace }} colcon_test_args: '--packages-select ${{ inputs.packages_names }} ${{ inputs.colcon_test_args }}' ctest_args: ' ${{ inputs.ctest_args }}' + extra_path: ${{ inputs.ctest_extra_path }} workspace_dependencies: ${{ inputs.workspace_dependencies }} diff --git a/multiplatform/colcon_test/action.yml b/multiplatform/colcon_test/action.yml index f0309cf5..47ad0a7e 100644 --- a/multiplatform/colcon_test/action.yml +++ b/multiplatform/colcon_test/action.yml @@ -3,6 +3,11 @@ description: 'Execute colcon test command with arguments given' inputs: + extra_path: + description: 'Directories to be added to the system PATH when running tests' + required: false + default: '' + colcon_test_args: description: 'args to pass to colcon test command (use ctest_args to set ctest arguments)' required: false @@ -56,5 +61,6 @@ runs: colcon_test_args_default: ${{ inputs.colcon_test_args_default }} ctest_args: ${{ inputs.ctest_args }} ctest_args_default: ${{ inputs.ctest_args_default }} + extra_path: '${{ inputs.extra_path }}' workspace: ${{ inputs.workspace }} workspace_dependencies: ${{ inputs.workspace_dependencies }} diff --git a/ubuntu/colcon_test/action.yml b/ubuntu/colcon_test/action.yml index 0860fdc3..ebe8701b 100644 --- a/ubuntu/colcon_test/action.yml +++ b/ubuntu/colcon_test/action.yml @@ -3,6 +3,11 @@ description: 'Execute colcon test command with arguments given' inputs: + extra_path: + description: 'Directories to be added to the system PATH' + required: false + default: '' + colcon_test_args: description: 'args to pass to colcon test command (use ctest_args to set ctest arguments)' required: false @@ -46,6 +51,8 @@ runs: source ${{ inputs.workspace_dependencies }}/setup.bash fi + export PATH="$PATH:${{ inputs.extra_path }}" + cd ${{ inputs.workspace }} colcon test \ diff --git a/windows/colcon_test/action.yml b/windows/colcon_test/action.yml index 5f9ad12b..4977265f 100644 --- a/windows/colcon_test/action.yml +++ b/windows/colcon_test/action.yml @@ -3,6 +3,11 @@ description: 'Execute colcon test command with arguments given' inputs: + extra_path: + description: 'Directories to be added to the system PATH' + required: false + default: '' + colcon_test_args: description: 'args to pass to colcon test command (use ctest_args to set ctest arguments)' required: false @@ -47,6 +52,8 @@ runs: ${{ inputs.workspace_dependencies }}/setup.ps1 } + $env:PATH+=";${{ inputs.extra_path }}" + cd ${{ inputs.workspace }} colcon test ` From 790856766e4168a7dcb116550b11edc77cf060c6 Mon Sep 17 00:00:00 2001 From: Raul Sanchez-Mateos Date: Tue, 10 Oct 2023 17:01:19 +0200 Subject: [PATCH 2/2] Use this branch for testing Signed-off-by: Raul Sanchez-Mateos --- multiplatform/colcon_build_test/action.yml | 2 +- multiplatform/colcon_test/action.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multiplatform/colcon_build_test/action.yml b/multiplatform/colcon_build_test/action.yml index 35721d79..af5b10c6 100644 --- a/multiplatform/colcon_build_test/action.yml +++ b/multiplatform/colcon_build_test/action.yml @@ -57,7 +57,7 @@ runs: cmake_build_type: ${{ inputs.cmake_build_type }} - name: Test - uses: eProsima/eProsima-CI/multiplatform/colcon_test@main + uses: eProsima/eProsima-CI/multiplatform/colcon_test@feature/extend-path with: workspace: ${{ inputs.workspace }} colcon_test_args: '--packages-select ${{ inputs.packages_names }} ${{ inputs.colcon_test_args }}' diff --git a/multiplatform/colcon_test/action.yml b/multiplatform/colcon_test/action.yml index 47ad0a7e..e2cab681 100644 --- a/multiplatform/colcon_test/action.yml +++ b/multiplatform/colcon_test/action.yml @@ -43,7 +43,7 @@ runs: steps: - name: Run in ubuntu - uses: eProsima/eProsima-CI/ubuntu/colcon_test@main + uses: eProsima/eProsima-CI/ubuntu/colcon_test@feature/extend-path if: runner.os == 'Linux' with: colcon_test_args: ${{ inputs.colcon_test_args }} @@ -54,13 +54,13 @@ runs: workspace_dependencies: ${{ inputs.workspace_dependencies }} - name: Run in windows - uses: eProsima/eProsima-CI/windows/colcon_test@main + uses: eProsima/eProsima-CI/windows/colcon_test@feature/extend-path if: runner.os == 'Windows' with: colcon_test_args: ${{ inputs.colcon_test_args }} colcon_test_args_default: ${{ inputs.colcon_test_args_default }} ctest_args: ${{ inputs.ctest_args }} ctest_args_default: ${{ inputs.ctest_args_default }} - extra_path: '${{ inputs.extra_path }}' + extra_path: ${{ inputs.extra_path }} workspace: ${{ inputs.workspace }} workspace_dependencies: ${{ inputs.workspace_dependencies }}