Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting github output for failed colcon test-result broken #853

Closed
fmauch opened this issue Mar 18, 2024 · 1 comment · Fixed by #854
Closed

Setting github output for failed colcon test-result broken #853

fmauch opened this issue Mar 18, 2024 · 1 comment · Fixed by #854
Labels

Comments

@fmauch
Copy link
Contributor

fmauch commented Mar 18, 2024

Hi,

after debugging a bit it seems to me that output reporting for a failed colcon test-result is broken.

I have setup a minimal project with a small C++-"library" and a gtest.

In the workflow I run ICI and print some ici outputs:

      - uses: 'ros-industrial/industrial_ci@master'
        env:
          ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
          ROS_REPO: ${{ matrix.ROS_REPO }}
        id: ici
      - name: Print ICI outputs
        if: ${{ always() }}
        run: echo 'build_target_workspace is ${{ steps.ici.outputs.build_target_workspace }}, run_target_test is ${{ steps.ici.outputs.run_target_test }}, target_test_results is ${{ steps.ici.outputs.target_test_results }}'

When everything succeeds, this prints

build_target_workspace is 0, run_target_test is 0, target_test_results is 0

However, when I add a deliberate failure to the gtest the result is

build_target_workspace is 0, run_target_test is 0, target_test_results is 

I verified that running the same commands (stripped by ici wrapping) locally

err=0
colcon test
colcon test-result --verbose || err=$?
echo "Test result: $err"

prints Test result: 1 in the end so I'm not sure whats going on here.

@mathias-luedtke
Copy link
Member

Thanks for reporting!
I can confirm that the output will not get reported properly.
My guess is that it never worked as expected, because this line is never reached:

ici_report_result "${name}_test_results" "$err"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants