-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ensure that cobra is executed during tests (#103). #120
Conversation
Can you modify the commit message to something like the following?
|
Done |
@xfiderek I know it built already but I'll wait for everything to build successfully before I merge. |
1272eae
to
22f68dc
Compare
I just rebased this and I plan to merge today. |
Space ROS's main Earthfile's build-testing procedure is invoked in CI to push results of tests and static code analysis. Currently, for all packages cobra-autosar.sarif results are empty. This is because cobra or some dependent executables are not found when colcon test command is invoked. This commit prefixes the call to colcon test in the Earthfile by a call to source that brings all the necessary tools and dependencies into scope.
22f68dc
to
aba59d0
Compare
There was an extra empty line at the end. I removed it and push-forced. Per our process, I'll wait for the build again. |
spaceros/Earthfile
Outdated
@@ -179,3 +179,4 @@ image: | |||
ENTRYPOINT ["/ros_entrypoint.sh"] | |||
CMD ["bash"] | |||
SAVE IMAGE --push osrf/space-ros:latest | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please remove this line? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed that comment
Summary
This PR fixes #103.
Space ROS's main Earthfile's build-testing procedure is invoked in CI to push results of tests and static code analysis. Currently, for all packages cobra-autosar.sarif results are empty. This is because cobra or some dependent executables are not found when colcon test command is invoked.
This PR prefixes the call to colcon test in the Earthfile by a call to source that brings all the necessary tools and dependencies into scope.
Note that re-enabling cobra significantly extends
build-testing
time from 1hr 13 minutes to 1hr 55 minutes on my local machine 1.Check the files before and after for comparison:
Future work
The results on SARIF dashboard are empty anyway, despite the fix. The reason is that
level
andkind
fields in results have value "unknown" 2. It can be an issue either withprocess_sarif
package or withament_cobra
package. I will investigate that further and raise consecutive issues.Footnotes
Time compared using
time earthly --no-cache +build-testing
command ↩Visualizing the results from
build
folder works, however cobra-autosar file fromprocessed
folder shows no results on dashboard. After changinglevel
andkind
fields in processed files, violated rules are displayed on dashboard as expected. ↩