-
Notifications
You must be signed in to change notification settings - Fork 15
Fix configuration precedence on replacement #559
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
Merged
doudou
merged 3 commits into
transition-to-runkit
from
fix_configuration_precedence_on_replacement
May 9, 2026
+92
−22
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -452,6 +452,37 @@ | |
| end | ||
| end | ||
|
|
||
| describe Roby::EventStructure::SyskitConfigurationPrecedence do | ||
| it "is copied and not moved on replace" do | ||
| # This is a regression test, really. Syskit adds a configuration precedence | ||
| # constraint between busses and devices, but at some point the configuration | ||
| # had been made strong (to solve another bug). The issue was that because of | ||
| # this, the relation was not propagated through replacements, which is | ||
| # the main operation used by Syskit during network gen/deployment/adaptation | ||
|
|
||
| combus_m = Syskit::ComBus.new_submodel message_type: "/int" | ||
| combus_driver_m = Syskit::TaskContext.new_submodel do | ||
| input_port "root_bus_in", "/double" | ||
| dynamic_output_port(/.*/, "/int") | ||
| end | ||
| combus_driver_m.provides combus_m, as: "driver" | ||
|
|
||
| device_m = Syskit::Device.new_submodel | ||
| device_driver_m = Syskit::TaskContext.new_submodel { input_port "bus_in", "/int" } | ||
| device_driver_m.provides combus_m.client_in_srv, as: "bus" | ||
| device_driver_m.provides device_m, as: "driver" | ||
|
|
||
| bus = robot.com_bus combus_m, as: "bus" | ||
| dev = robot.device device_m, as: "dev" | ||
| dev.attach_to(bus, client_to_bus: false) | ||
| syskit_stub_configured_deployment(device_driver_m) | ||
| syskit_stub_configured_deployment(combus_driver_m) | ||
| dev_driver = syskit_deploy(dev) | ||
| bus_driver = plan.find_tasks(combus_driver_m).with_parent(dev_driver).first | ||
| refute dev_driver.meets_configurationg_precedence_constraints? | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, what happens if |
||
| end | ||
| end | ||
|
|
||
| describe "#should_configure_after" do | ||
| it "adds a configuration precedence link between the given event and the start event of the receiver" do | ||
| plan.add(component = Syskit::Component.new) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.