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

[ros2pkg] Skip copyright tests in template packages #676

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

aprotyas
Copy link
Member

The template sources populated through ros2 pkg create for the
ament_python/ament_cmake build types do not have well-formed
copyright headers, and as such fail the ament_copyright tests when
run as-is.

This commit skips said test by default, instead informing the user to -
once the source files have been populated with well-formed headers -
enable the skipped tests either within the test script itself (for
ament_python) or within the CMakeLists.txt file (for ament_cmake).

Addresses #675.

Signed-off-by: Abrar Rahman Protyasha aprotyas@u.rochester.edu

The template sources populated through `ros2 pkg create` for the
`ament_python` build type do not have a well-formed copyright header,
and as such fail the `ament_copyright` test when run as-is.

This commit skips said test by default, instead informing the user to
remove the `skip` decorator once they've populated their sources with
the proper copyright headers.

Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
@aprotyas aprotyas self-assigned this Nov 30, 2021
The template sources populated through `ros2 pkg create` for the
`ament_cmake` build type do not have a well-formed copyright header
and the package itself does not have a proper license file. As such, the
copyright and cpplint linters report missing license/copyright problems
with the generated package.

This commit skips said tests by default, instead informing the user to
comment out the lines which allow the copyright and cpplint linter
checks to be skipped once license/copyright headers are placed in the
package appropriately.

Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
@aprotyas aprotyas marked this pull request as ready for review November 30, 2021 05:28
@aprotyas
Copy link
Member Author

aprotyas commented Nov 30, 2021

For reviewers, it's unfortunate that the cpplint test has to be skipped for the ament_cmake package, but the alternative to that is excluding ament_cmake_cpplint from ament_lint_auto, and then invoking ament_cpplint separately in the CMakeLists.txt file with the -legal/copyright filter. This is awkward and would add too much noise for a beginner-friendly template.

@aprotyas
Copy link
Member Author

CI:
Repos file: https://gist.githubusercontent.com/aprotyas/9b99d00cde99c02bdca20f0b7beed36c/raw/10d3416f66f87a3d300d0ed9b03c3c8189085a0a/ros2.repos
Build args: --packages-up-to ros2pkg
Test args: --packages-select ros2pkg
Job: https://ci.ros2.org/job/ci_launcher/9408/

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@audrow audrow linked an issue Nov 30, 2021 that may be closed by this pull request
@audrow audrow merged commit aeb2e8c into master Nov 30, 2021
@delete-merged-branch delete-merged-branch bot deleted the aprotyas/fix/675/disable_copyright_tests branch November 30, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

newly created package fails colcon test
3 participants