-
Notifications
You must be signed in to change notification settings - Fork 96
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
Create and use a 'fake' rosdep cache for tests #614
Conversation
d6b91f2
to
a0dc05c
Compare
The idea here is to decouple Bloom from the live rosdistro index and rosdep database. This will also isolate bloom from the rosdep state that the system has, and makes the tests function without any network access. Since the system rosdep state isn't a dependency any more, the tests can be run even if 'rosdep init' has not been invoked on the system, meaning that the tests can now be executed without sudo rights. This change also significantly reduces the time it takes to run the tests. Part of that is due to the 'BLOOM_SKIP_ROSDEP_UPDATE', which suppresses Bloom's automatic rosdep update invocation. This isn't necessary for the 'fake' rosdep cache to work, but it makes things a bit quicker.
The tests are no longer dependent on the system's rosdep state.
a0dc05c
to
948fc53
Compare
This brought the Travis build down from ~20 min to ~8 min. I expect there will be similar gains in GitHub Actions. |
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.
Beyond fixing #616 (which I can confirm locally), I think de-coupling this from the production rosdistro is a great idea on its own. Code looks great to me.
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.
This approach looks good to me. In the future it might make sense to move this mocking capability into rosdep so it can be reused elsewhere for testing including over there.
The idea here is to decouple Bloom from the live rosdistro index and rosdep database. This will also isolate bloom from the rosdep state that the system has, and makes the tests function without any network access. Since the system rosdep state isn't a dependency any more, the tests can be run even if 'rosdep init' has not been invoked on the system, meaning that the tests can now be executed without sudo rights.
This change also significantly reduces the time it takes to run the tests. Part of that is due to the
BLOOM_SKIP_ROSDEP_UPDATE
value, which suppresses Bloom's automatic rosdep update invocation. This isn't necessary for the 'fake' rosdep cache to work, but it makes things a bit quicker.This change is motivated by the tests currently failing due to ros/rosdistro#27640. Rather than just update the tests to reflect the change, this approach will isolate the tests from future changes of the same kind.
Closes #616