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

Add SKIP_RETURN_CODE argument to ament_add_test #264

Merged
merged 2 commits into from Jul 15, 2020
Merged

Commits on Jul 15, 2020

  1. Add SKIP_RETURN_CODE argument to ament_add_test

    This makes the `run_test.py` wrapper aware of the `SKIP_RETURN_CODE`
    property on CTest tests. In the existing implementation, the wrapper
    detects that no result file was generated and overrides the special
    return code coming from the test, making the the CTest feature fail
    completely.
    
    This change makes the wrapper script aware of the special return code,
    and when detected, will write a 'skipped' result file instead of a
    'failed' result file, and pass along the special return code as-is. Now
    the gtest result and the ctest results both show the test as 'skipped'
    when the special return flag is used.
    
    Note that none of this behavior is enabled by default, which is
    important because we wouldn't want a test to fail and return a code
    which we've decided is the special 'skip' return code. Only tests which
    are aware of this feature should use it.
    
    Signed-off-by: Scott K Logan <logans@cottsay.net>
    cottsay committed Jul 15, 2020
    Copy the full SHA
    a39800e View commit details
    Browse the repository at this point in the history
  2. Verify range of the return code argument

    Signed-off-by: Scott K Logan <logans@cottsay.net>
    cottsay committed Jul 15, 2020
    Copy the full SHA
    153b2d9 View commit details
    Browse the repository at this point in the history