Skip to content

gpiodriver: allow GpioDigitalOutputDriver match against MatchedSysfsGPIO #1646

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

threexc
Copy link
Contributor

@threexc threexc commented Apr 15, 2025

The documentation states that the GpioDigitalOutputDriver should bind to the following three 'gpio' options:

  • SysfsGPIO
  • MatchedSysfsGPIO
  • NetworkSysfsGPIO

However, the bindings list is:

bindings = {
    "gpio": {"SysfsGPIO", "NetworkSysfsGPIO"},
}

and as a result, if I try to bind these two in an environment, I see errors like:

labgrid.exceptions.NoSupplierFoundError: binding copilot-output-driver failed: no supplier matching {'NetworkSysfsGPIO', 'SysfsGPIO'} found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml')) (errors: [NoResourceFoundError(msg="no NetworkSysfsGPIO resource found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml'))", filter=None, found=None), NoResourceFoundError(msg="no SysfsGPIO resource found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml'))", filter=None, found=None)])

Adjust the list to include MatchedSysfsGPIO so that this works (and so that the docs are correct).

The documentation states that the GpioDigitalOutputDriver should bind to
the following three 'gpio' options:

- SysfsGPIO
- MatchedSysfsGPIO
- NetworkSysfsGPIO

However, the bindings list is:

    bindings = {
        "gpio": {"SysfsGPIO", "NetworkSysfsGPIO"},
    }

and as a result, if I try to bind these two in an environment, I see
errors like:

labgrid.exceptions.NoSupplierFoundError: binding copilot-output-driver failed: no supplier matching {'NetworkSysfsGPIO', 'SysfsGPIO'} found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml')) (errors: [NoResourceFoundError(msg="no NetworkSysfsGPIO resource found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml'))", filter=None, found=None), NoResourceFoundError(msg="no SysfsGPIO resource found in Target(name='beagleplay', env=Environment(config_file='bp-conf2.yaml'))", filter=None, found=None)])

Adjust the list to include MatchedSysfsGPIO so that this works (and so
that the docs are correct).

Signed-off-by: Trevor Gamblin <[email protected]>
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.8%. Comparing base (7ba98e5) to head (f0407d3).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1646   +/-   ##
======================================
  Coverage    55.8%   55.8%           
======================================
  Files         170     170           
  Lines       13388   13388           
======================================
  Hits         7471    7471           
  Misses       5917    5917           
Flag Coverage Δ
3.10 55.8% <ø> (ø)
3.11 55.8% <ø> (ø)
3.12 55.8% <ø> (ø)
3.13 55.7% <ø> (ø)
3.9 55.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@threexc
Copy link
Contributor Author

threexc commented Apr 23, 2025

Not clear to me why the test_place_match test is failing - might be an issue only on Python 3.9?

Otherwise looks OK.

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.

1 participant